VS2015-更改TypeScript版本 [英] VS2015 - Change TypeScript Version

查看:446
本文介绍了VS2015-更改TypeScript版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我的Visual Studio 2015 + Cordova + TypeScript项目更新为使用TypeScript版本到 1.6.0-beta 。我当前正在使用 1.5.3

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.

我能够使用NPM安装最新版本,但我的项目仍在使用旧版本。
npm install -g打字稿

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

如何使我的项目使用最新的TypeScript版本?

TypeScript版本的位置:

Locations of TypeScript Versions:

1.5.3 = C:\程序文件(x86)\Microsoft SDKs\TypeScript\1.5

1.6.0-beta = C:\Users\XXX\AppData\Roaming\npm

---------------------更新9/4/2015 ----------------- ---------

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

我更新了项目.jsproj文件XML元素< TypeScriptToolsVersion> 1.5< / TypeScriptToolsVersion> < TypeScriptToolsVersion> 1.6.0-beta< / TypeScriptToolsVersion> 。我将文件夹 1.6.0-beta 和NPM文件添加到 C:\Program Files(x86)\Microsoft SDKs\TypeScript 和VS2015不使用最新的TypeScript。

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 SDKs\TypeScript and VS2015 doesn't use the latest TypeScript.

我错过了什么吗?

推荐答案

以下是在Visual Studios 2015中升级TypeScript的解决方案:

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

可从以下网站下载TypeScript EXE版本:

点击详细信息以查看其他版本:在这种情况下,我想下载1.6.0 Beta

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

下载exe并安装o

在VS2015中创建一个新的TypeScript Cordova项目。 VS2015可能会询问您是否要将项目升级到最新版本。根据需要遵循指示。

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.

更新现有项目

如果您现有的项目需要使用特定版本的TypeScript,请使用上述步骤下载TypeScript版本,然后修改.jsproj文件的XML元素< TypeScriptToolsVersion> 1.6< / TypeScriptToolsVersion> 。将数字设置为位于 C:\Program Files(x86)\Microsoft SDKs\TypeScript 文件夹中的文件夹名称。文件夹名称代表已安装的TypeScript版本。

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 SDKs\TypeScript folder. The folder name represents the installed TypeScript version.

这篇关于VS2015-更改TypeScript版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆