Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am trying to update my Visual Studio 2015 + Cordova + TypeScript project to use TypeScript version to 1.6.0-beta. I am currently using 1.5.3.

I am able to use NPM to install the latest version, but my project continues using the old version. npm install -g typescript

How can I make my project use the latest TypeScript version?

Locations of TypeScript Versions:

1.5.3 = C:Program Files (x86)Microsoft SDKsTypeScript1.5

1.6.0-beta = C:UsersXXXAppDataRoaming pm

--------------------- Updated 9/4/2015 --------------------------

I updated the projects .jsproj file XML element <TypeScriptToolsVersion>1.5</TypeScriptToolsVersion> to <TypeScriptToolsVersion>1.6.0-beta</TypeScriptToolsVersion>. I added the folder 1.6.0-beta and NPM files to C:Program Files (x86)Microsoft SDKsTypeScript and VS2015 doesn't use the latest TypeScript. enter image description here

Am I missing something?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
228 views
Welcome To Ask or Share your Answers For Others

1 Answer

Here's the solution to upgrading TypeScript in Visual Studios 2015:

Download the TypeScript EXE release from the following website: http://www.microsoft.com/en-us/download/details.aspx?id=48593 enter image description here

Click the details to view other releases: In this case I want to download 1.6.0 Beta enter image description here

Download the exe and install onto computer.

Create a new TypeScript Cordova project in VS2015. VS2015 may ask if you want to upgrade the project to the latest version. Follow the directions as necessary. enter image description here

Updating Existing Projects

If you have an existing project that needs to use a specific version to TypeScript, download the TypeScript version using the above steps, and modify the .jsproj file's XML element <TypeScriptToolsVersion>1.6</TypeScriptToolsVersion>. Set the number to the folder name located in C:Program Files (x86)Microsoft SDKsTypeScript folder. The folder name represents the installed TypeScript version.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...