0

下載並安裝Multi-Device Hybrid Apps for Visual Studio CPT1後,我創建了TypeScript/Multi-Device混合應用程序項目。我是能夠建立與Android和iOS目標的項目,但是當我在目標平臺切換到WP8,錯誤出現(這是所有從VS):Visual Studio空Cordova多設備混合應用程序構建失敗

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

+0

你能否提供一些代碼,尤其是引發上述錯誤的q.js腳本部分? – vonPetrushev

+0

q.js不是我的代碼,而是它安裝的軟件包的一部分......我查看了代碼,它看起來像是任務系統的一部分。我不認爲發佈它會提供任何見解,除了爲什麼iOS和Android工作,WP8沒有。它看起來像錯誤只對非基於瀏覽器的調試器是致命的,基於瀏覽器的構建只是報告錯誤並繼續。 – user3667122

回答

1

我通過清除註冊表項解決了這個問題:

HKEY_LOCAL_ MACHINE \系統\ CurrentControlSet \控制\會話管理\環境\平臺

值得注意:

我不相信這個問題是具體到科爾多瓦VS整合,而是跟我的環境設置與科爾多瓦打很好的問題。

相關問題