Richard Collette
Richard Collette

Reputation: 5703

How can I have TypeScript build only on save in Visual Studio

When I build the project, it is redundantly building script event though I have script compiling on run/debug. Is there a way to make it only build on save?

Upvotes: 0

Views: 1120

Answers (2)

Richard Collette
Richard Collette

Reputation: 5703

You can set the build type to none and saving the .ts file will still build the .js file. However, the .js file does not get checked in to TFS so when someone gets the project, they would have to open and save every file. This seems to be another issue.

Upvotes: 0

Rajeesh
Rajeesh

Reputation: 4485

If you have installed Web Essentials 2012 extension it is very easy.

In Visual Studio go to Tools -> Options -> Select Web Essentials, Under the TypeScript set "Compile TypeScript on Save" to True

enter image description here

Upvotes: 1

Related Questions