【发布时间】:2014-11-16 06:03:09
【问题描述】:
下载并安装Multi-Device Hybrid Apps for Visual Studio CPT1后,我创建了一个TypeScript/Multi-Device Hybrid App项目。我能够用Android和iOS目标构建项目,但是当我将目标平台切换到WP8时,出现了错误(这都是来自VS):
1. MSBuild failed to create .xap when building cordova-wp8 for debugging.
2. X:\...\bld\Debug\platforms\wp8\cordova\build.bat: Command failed with exit code 2
3. The command ""X:\...\AppData\Roaming\npm\node_modules\vs-mda\vs-cli" build --platform "Windows Phone" --configuration "Debug" --projectDir . --projectName "x" --buildServerUrl "" --buildTarget "PhoneEmulatorWvga512"" exited with code 8.
于是我决定手动尝试这个并得到以下错误:
X:\...\AppData\Roaming\npm\node_modules\vs-mda\node_modules\q\q.js:126
throw e;
^
Error: X:\...\bld\Debug\platforms\wp8\cordova\build.bat: Command failed with exit code 2
at ChildProcess.whenDone (X:\...\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\src\superspawn.js:126:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Process.ChildProcess._handle.onexit (child_process.js:820:5)
这一切都是通过全新安装和 VS2013 更新 2 完成的。
【问题讨论】:
-
您能否提供一些代码,尤其是 q.js 脚本中引发上述错误的部分?
-
q.js 不是我的代码,而是已安装包的一部分...我查看了代码,它看起来像是任务系统的一部分。我认为发布它不会提供任何见解,除了为什么 iOS 和 Android 可以工作,而 WP8 不能。看起来错误只对非基于浏览器的调试器是致命的,基于浏览器的构建只是报告错误并继续。
标签: visual-studio cordova windows-phone-8 visual-studio-cordova