9/27/2016 8:16:18 PM

When compiling in VS 2015 (maybe earlier versions), you may get a compiler error related to TypeScript. You may then curse the fucking shit out of Microsoft for updating VS only to prevent you from continuing to work and tell you about errors that you have nothing to do with. Well, when you are done cursing, you can try the following.

  1. Close VS or Unload the project you are working on (right click the Project -> Unload Project)
  2. Open the csproj file in a text editor (NotePad++ is my favorite)
  3. Add the <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> line below the version (see below)
  4. Restart VS or the reload the Project


<TypeScriptToolsVersion>1.8</TypeScriptToolsVersion> <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>

*Update for Visual Studio 2019

*Untested but if needed, try disabling "Automatically compile TypeScript files which are not part of a project"