无法在Visual Studio 2013中创建Apache Cordova项目 [英] Unable to create Apache Cordova project in Visual Studio 2013

查看:186
本文介绍了无法在Visual Studio 2013中创建Apache Cordova项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在创建Visual Studio 2013中的Apache Cordova项目时遇到问题,他们的新CTP1.1补丁支持这些项目类型。
我有我的环境工作和建设,但我需要得到TypeScript工作,所以我可以使用DefinitelyTyped Packed,它提供了你需要连接到Cordova API的类型。
所以我已经安装了这个包:

I am having trouble creating an Apache Cordova project in Visual Studio 2013 with their new CTP1.1 patch that enables support for these project types. I had my environment working and building but I needed to get TypeScript working so I can use the DefinitelyTyped Packed which provides the types you need to hook up to the Cordova API. So I have installed this package:

DefinitelyTyped\Cordova

但我注意到,我无法添加自己的TypeScript文件类型,然后告诉Visual Studio这需要以使用TypeScript进行编译。
项目模板附带了一个index.ts,它可以正常工作,因为项目文件中有这个:

But I noticed that I could not add in my own TypeScript File type which then tells Visual Studio that this needs to be compiled using TypeScript. The project template comes with a index.ts which does work correctly because the project file has this in there:

所以我需要有这种类型,以便能够更新项目文件与这些entires没有黑客在项目文件中每次我需要添加一个.ts文件。 (我将添加为.js,然后重命名为.ts)。
然后我在这里找到了Visual Studio 2013 Update 2的安装程序:

So i needed to have this type included to be able to update the project file with these entires without hacking about in the project file each time i needed to add a .ts file. (Which I would add as a .js and then rename it to .ts). I then found an installer for Visual Studio 2013 Update 2 for TypeScript here:

Typescript安装程序

现在我收到一个错误,项目类型,但所有其他项目类型是好的,这对我来说意味着它与我刚刚做的TypeScript安装相关:

Now I recieve an error which means I cannot create the project type anymore, but all the other project types are okay, which to me means that it is related to the TypeScript installation that I just did:


导入的项目C:\Program
Files(x86)\MSBuild\Microsoft\VisualStudio\v12.0\Javascript\Microsoft.VisualStudio.Javascript.Common.targets
未找到。确认路径.... etc。

The imported project "C:\Program Files(x86)\MSBuild\Microsoft\VisualStudio\v12.0\Javascript\Microsoft.VisualStudio.Javascript.Common.targets" was not found. Confirm that the path .... etc.

我的问题是...如何解决这个问题?或者...其他人如何在Visual Studio 2013 Update 2 CTP1.1中使用Cordova API而不使用TypeScript?

My question is ... How do I resolve this? Or ... How is everyone else using the Cordova API in Visual Studio 2013 Update 2 CTP1.1 without using TypeScript?

任何帮助将不胜感激,提前感谢!

Any help will be appreciated, thanks in advance!

推荐答案

现在,项目创建问题可能已经解决,因为有多个新的CTP版本的Cordova工具, Visual Studio 2015。看起来这个问题也在评论中解决(虽然出现了单独的问题)。我在团队中工作,构建这些Cordova工具,我知道我们修复了从CTP 1.1版本以来的安装问题,所以我建议升级。

The project creation issues may be fixed now since there were several new CTP releases of the Cordova tools and they have reached RTM in Visual Studio 2015. It looks like this issue was also solved in the comments (though separate issues came up). I work in the team that builds these Cordova tools and I know that we fixed may installation issues since the CTP 1.1 release, so I'd suggest upgrading.

在这个问题中提到 - 以下是在Visual Studio中使用TypeScript文件与Apache Cordova的一些指导:

Also, since it was mentioned in this question - Here's some guidance for using TypeScript files in Visual Studio with Apache Cordova:

https://github.com/Microsoft/cordova-docs/blob/master/getting-started/tutorial-typescript .md

这篇关于无法在Visual Studio 2013中创建Apache Cordova项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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