"tsc.exe" exited with code 1 when using ASP.net 4 MVC

I resolved the build issue in VisualStudio 2015 Update 3 by adding

  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />

to the visual studio .csproj file.


If you reached here while using one of these tutorials:
https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html#!#prereq4 https://www.typescriptlang.org/docs/handbook/asp-net-4.html

Try this method to install TypeScript 2.0: https://www.microsoft.com/en-us/download/details.aspx?id=48593

It seems npm adds TypeScript 2.0 to the local users folders instead of the common program folder where visual studio looks by default. The install above will add it to the common program folder, which visual studio will detect without changes to the environment variable.

HTH


I solved this problem installing

Nuget package

> Typescript 2.0.6 for Visual Studio 2015