0
votes

After downloading and installing Multi-Device Hybrid Apps for Visual Studio CPT1, I created a TypeScript/Multi-Device Hybrid App project. I was able to build the project with Android and iOS targets, but when I switch the target platform to WP8, errors arose (this is all from 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.

So I then decided to try this manually and got the following error:

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)

This is all with a clean install and VS2013 Update 2.

1
Can you please provide some code, especially the part of the q.js script that throws the said error?vonPetrushev
q.js isn't my code, rather it is part of the installed packages... I looked at the code and it looks like part of a task system. I don't think posting it would provide any insights, other than why iOS and Android work, and WP8 doesn't. It looks like errors are only fatal for non-browser based debuggers, the browser based builds simply report the error and continue.user3667122

1 Answers

1
votes

I resolved the problem by clearing the registry key at:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Platform

Noteworthy:

I do not believe the problem was specific to Cordova VS integration, but rather a problem with my environment setup playing nicely with Cordova.