Maniaque
Maniaque

Reputation: 761

What determines which version of Typescript is used during an msbuild process?

I have multiple systems for performing C# solution build via a msbuild script. Within this solution is a project (csproj) that contains references to .ts files to be compiled using visual studio 2013 built in support for tsc.

On our original build system when the project builds from the msbuild project script it references C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0 while on a new system it's wired to C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.1, and we need 1.0 to work properly. How/where do I change this to point at the proper version?

Upvotes: 6

Views: 1806

Answers (2)

Dick van den Brink
Dick van den Brink

Reputation: 14557

You can open the csproj in a texteditor and add the following to it, to use the 1.0 TypeScript compiler.

<PropertyGroup>
    <TypeScriptToolsVersion>1.0</TypeScriptToolsVersion>
</PropertyGroup>

Just but it below another property group and you should be good to go. Offcourse TypeScript 1.0 should be installed to make this work.

Upvotes: 4

Nicodemeus
Nicodemeus

Reputation: 4083

If you need a specific version of a dependency and are concerned that other developers might have newer or legacy versions, check the NuGet Gallery to find out how to integrate NuGet and have it pull down the appropriate version during the build process.

This will alleviate the install dependency from your build processes, or the need to control the installation status of various dependency components.

Upvotes: 0

Related Questions