11

I am using the typescript. I can create simple typescript samples and run. When i was creating complex type of codes, visual studio becomes not responding.

Can any of you know the reason for this issue? The Performance tab on TaskManager takes approx 35%. Can any of you aware of this issue?

Code i was implemented looks like below,

module myModule{
  export class myClass implements myInterface{
    // code to PartialUpdate, otalUpdate function declarations and 
    // extra properties and methods
  }
  export interface myInterface{
    PartialUpdate:void;
    TotalUpdate:void;
  }
}

Note: Visual Studio becomes not responding while creating code itself, before starting build.

I have used the following extensions:

  • MicroSoft Web Developer Tools,
  • Nuget Package Manager,
  • TypeScript for VS 2012
  • VS Extensions for Windows Library for JavaScript and
  • Web Essentials 2012

And my system config is

  • Processor:Pentium Dual core 2.70GHZ
  • RAM: 4 GB
  • System type: 64 bit
Jude Fisher
  • 11,138
  • 7
  • 48
  • 91
Rajagopal 웃
  • 8,061
  • 7
  • 31
  • 43

1 Answers1

5

Are you using the latest version of Web Essentials 2012? (2.0 at time of writing) And of TypeScript (0.8.1.1)? I had the same issue with an earlier combination of WE and TS 0.8.1, but it was fixed in a recent release.

WebEssentials can be configured either to compile on save, and/or on build. Go Tools > Options > Web Essentials > TypeScript in VS2012 and try toggling these switches and see if this helps.

Disable Web Essentials, go to the Tools > Options as described above, and try turning off Compile TypeScript on save. This way you can have all the benefits of WE without the performance hit

Update

WE 2012 has just ticked over to the next version: 2.1

Jude Fisher
  • 11,138
  • 7
  • 48
  • 91
  • i was using TypeScript 0.8.1.1 only. And i have referred the same url to support TypeScript in js. FYI, i were using the web essentials which is downloaded from the given link only. – Rajagopal 웃 Dec 17 '12 at 14:51
  • Enable Web Essentials, go to the Tools > Options as described above, and try turning off 'Compile TypeScript on save'. This way you can have all the benefits of WE without the performance hit. FYI I am working on a very complex modular project (50+ TS files and counting, up to five levels of nested AMD modules), and with the latest versions of WE and TS, everything compiles in no time. – Jude Fisher Dec 17 '12 at 14:54
  • do you need Web Essentials 2012 if you have vs 2012? – Nikos Dec 18 '12 at 13:46
  • @Nikos - WE 2012 extends the TS (and other web) capabilities of VS 2012. The two are complementary. So no, you don't need it, but I've personally found it very useful in working with TS. Have a look at the feature set (at the link above), and see if you think it would be of benefit to you. – Jude Fisher Dec 18 '12 at 15:20
  • @JcFx nice just what I needed. Do you know if it automatically changes your project to use 0.81? I recently installed the new typescript. – Nikos Dec 18 '12 at 19:05
  • @Nikos - I've never manually changed the TS version (just installed successive releases of TS and WE). My understanding was that the VS installer for TS upgraded the version used, but I'm not sure. Anyway it seems to happen automagically. – Jude Fisher Dec 18 '12 at 19:11
  • @JcFx hmm, I actually had to manually edit the csproj to use the .81 otherwise the compile failed – Nikos Dec 20 '12 at 12:17
  • @Nikos - Probably because the TypeScriptCompile command is not referenced in my project file. I never added it manually (like this, for example: http://stackoverflow.com/a/12681880/1014822) - I've always had WE2012 installed and it has taken care of building TS from the start. – Jude Fisher Dec 20 '12 at 13:24