我正在尝试更新我的 Visual Studio 2015 + Cordova + TypeScript 项目以使用 TypeScript 版本1.6.0-beta
。我目前正在使用1.5.3
.
我可以使用 NPM 安装最新版本,但我的项目继续使用旧版本。npm install -g typescript
如何让我的项目使用最新的 TypeScript 版本?
TypeScript 版本的位置:
1.5.3
= C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.5
1.6.0-beta
= C:\Users\XXX\AppData\Roaming\npm
--------------------- 更新于 2015 年 9 月 4 日 ---------------------------------- ---
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 的解决方案:
Download the TypeScript EXE release from the following website:
http://www.microsoft.com/en-us/download/details.aspx?id=48593 http://www.microsoft.com/en-us/download/details.aspx?id=48593
Click the details to view other releases: In this case I want to download 1.6.0 Beta
下载exe并安装到计算机上。
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 版本。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)