TypeScript version mismatch in Visual Studio 2019

This may have gotten easier since the original answer.

Now you can just install NuGet package Microsoft.TypeScript.MSBuild.

Then you don't need to install the SDK separately and it is recommended by Microsoft to use NuGet or npm: https://docs.microsoft.com/en-us/visualstudio/javascript/javascript-in-vs-2019?view=vs-2019

In the project Properties > Typescript Build tab, the Typescript version will change to n.n (NuGet) and will be grayed out. Now if you work on a team, all team members will be certain to have the same version for this project! Cool!


I had a similar problem as you describe but in the Task Runner Explorer.

Assumptions: TypeScript is should be in your PATH variables (you can check by running 'tsc -v' from a normal command prompt.

Since quite a while, Visual Studio allows you to choose the TypeScript version to use on a per-project basis (right-click project => Properties => tab 'Typescript Build'). Here you could choose an officially installed version but also 'Use latest available'.

In Visual Studio Options you can specify the locations and order in which 'External Web Tools' are used when building web projects using 3rd party tools. In that list, you will probably find an item '$(PATH)'. I moved it to the top of the list, which makes the globally installed TypeScript version the first to be found when searching for it.

I hope this applies for your situation as well.