Keep getting "tsc.exe" exited with code 1

Solution 1:

Install these 2 NuGet packages:

Microsoft.TypeScript.MSBuild and Microsoft.TypeScript.Compiler

It updates your project with MSBuild task definition and TS compiler and solves the compilation issue

Solution 2:

For me installing TypeScript for Visual Studio fixed it, although TypeScript was already installed globally on my machine via npm

Solution 3:

I am using a .NET Core 1.0 project and ran into the same situation of getting a tsc.exe return code of 1. My problem was an invalid tsconfig.json. However, msbuild does not provide those details.

The easiest way to find out is to enable detailed output in Visual Studio -> Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity. Change this to Detailed. After compiling, find tsc.exe in the output window to see the actual error tsc was throwing.