How to disable building of TypeScript files in Visual Studio 2015

If you would like to disable building TypeScript files in your solution for some reason (you want different build workflow, you just work on .cs files and don’t touch .ts files), you had to search for some kind of ifs or comments out to the project file in previous version of Visual Studio.

The problem as such is not new and solution was requested for some time from TypeScript team.

After digging in some articles I found this not much hyped solution :
add node

<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>

to the first

<PropertyGroup>

element in .csproj file.

For me, it worked.

More on the problem here :
https://github.com/Microsoft/TypeScript/issues/2326
https://github.com/Microsoft/TypeScript/issues/2294

One small note : if you have an error in the .ts files and compilation is disabled, build will not fail in Visual Studio 2015. But you can still see all errors in Error list tab. And you will still have IntelliSense.

12 thoughts on “How to disable building of TypeScript files in Visual Studio 2015

  1. Thanks, this helped. Build server was throwing an error and we didn’t realize that this Typescript compilation started with the latest update to VS 2015.

  2. Excellent find! We have an MVC app that bootstraps our angular app and the build of the solution was blocked by the angular components not being able to build correctly.

Leave a Reply

Your email address will not be published. Required fields are marked *