Disable Typescript Compiling In VS 2013

Topics: General
Nov 12, 2013 at 11:54 AM
Hi,

I just want to use VS for syntax highlighting. I have a grunt + typescript build process that listens for file changes.

The problem is that visual studio keeps adding an msbuild task to my project when i add a typescript file, or update typings via nuget.

Ideally if i could add an msbuild condition to cancel the typescript msbuild take that would stop this compilation.
Nov 12, 2013 at 4:27 PM
I'm curious. What's the advantage of Grunt and a file watcher building your TypeScript files over letting VS do it?
Nov 12, 2013 at 4:52 PM
it doesnt just compile typescript,

its a full pipeline from typescript -> javascript -> jslint -> uglify -> jasmine tests -> compile angular templates -> run specs -> concat -> minify

plus i dont get the performance issues vs has with typescript.

but more importantly the pipeline above is a big win.
Developer
Nov 12, 2013 at 8:15 PM
If you right click on a file in Solution Explorer and select Properties then you'll be able to change the Build Action from TypeScriptCompile to None/Content/whatever.
Nov 12, 2013 at 8:44 PM
This can be quite laborious is there a way to change the default beaviour for typescript files?
Nov 12, 2013 at 11:54 PM
You might get what you want by changing the targets file at C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\TypeScript\Microsoft.TypeScript.targets and emptying out the CompileTypeScript target.

I'm only guessing here because no one else has responded in a while.
May 1 at 10:03 AM
Having the same issues with using bundletransformer as I prefer to control the build pipeline myself as I have no wish to pollute my build servers with installing bits of msbuild folders and typescript compilers on all my build servers.

Setting the project options to uncheck the 'Compile on save' does not prevent the js files from being created.
Setting the build action on .ts files from TypeScriptCompile to Content also does not stop the js files from being created.

This need sorted IMO as I shouldn't be hand editing the csproj files to remove the imports that typescript tooling inserts.

This is using VS2013 Update 2 RC.
May 8 at 3:28 PM
I was able to "fix" this by adding a Condition="false" to both imports in the project file. I found that VS does not automatically reinsert the imports if you do this.