TFS (web) gives an error while building Typescript. Typescript.targets not found

We just converted our javascript files to typescript. Everything builds locally just fine, but our build in TFS (the cloud version ie tfs.visualstudio.com) gave us an error:

The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\TypeScript\Microsoft.TypeScript.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. 

Locally we use typescript version 0.9.1.1 and VS2012

And advise?

+4
source share
3 answers

In order for web projects using Microsoft.TypeScript.targets to be successfully created on the build server, you have two options:

  • Install TypeScript on the build server
  • Copy the necessary files for Microsoft.TypeScript.targets to another folder with a controlled source and change the links to the path to the csproj file in this folder.

More details here => http://typescript.codeplex.com/workitem/1518

+4
source

This usually happens because you did not install the TypeScript extension on the build server - it will need the same installer that you used locally.

This will place tsc.exe in the SDK / Typescript folder and allow the build server to create your TypeScript files and check all your types.

+1
source

I had to install Visual Studio 2013 RC2 to install TypeScript by default and get rid of this error message, instead of trying to download the package. It can be found here:

http://www.microsoft.com/fr-fr/download/details.aspx?id=42666

+1
source

Source: https://habr.com/ru/post/1502823/


All Articles