Disable MSBuild TypeScript Compile

Add the property <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> to a PropertyGroup in your csproj file (I added it under the Configuration label). This should disable all msbuild based TS compilation.

With this setting enabled you shouldn't need the tsconfig.json settings compileOnSave/buildOnSave.

If you are on an older version of Visual Studio (I had implicitly thought about VS 2017 or xproj with 2015), the property may be <TypeScriptEnabled>false</TypeScriptEnabled>.


I had all of this configured, but it still did not fix the issue (in visual studio 2019). I added additionally this:

 <TypeScriptCompileOnSaveEnabled>False</TypeScriptCompileOnSaveEnabled>

and restarted the visual studio. After that, it started working for me.