Carlos Santana created CB-5359: ---------------------------------- Summary: WP8 not very clear msbuild requirement Key: CB-5359 URL: https://issues.apache.org/jira/browse/CB-5359 Project: Apache Cordova Issue Type: Bug Components: CLI, WP8 Affects Versions: Master, 3.2.0 Environment: Windows 8 Pro x64 Reporter: Carlos Santana Assignee: Jesse MacFadyen
The requirement for msbuild is not very clear, and have potential to be optimized by using the registry to find the correct location of msbuild.exe cordova platform add wp8 Error: Please install the .NET Framwork v4.0.30319 (in the latest windows phone SDK's Make sure the "msbuild" command in your path is pointing to v4.0.30319 of msbuild as well (inside C:\Windows\\Microsoft.NET\Framework\v4.0.30319 So like any good developer I google for where to find the path of msbuild.exe On StackOverflow search "msbuild path" http://stackoverflow.com/questions/328017/path-to-msbuild There could be multiple copies of msbuild based on framework version and architecture Ran reg.exe Look in: HKLM:\software\Microsoft\MSBuild\ToolsVersions\4.0 Key: "MSBuildToolsPath" Value: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ Add value to %PATH% environment variable The run cordova to add wp8, it works, but it fails on build C:\Users\Carlos\Desktop>msbuild -version Microsoft (R) Build Engine version 4.0.30319.17929 [Microsoft .NET Framework, version 4.0.30319.18051] Copyright (C) Microsoft Corporation. All rights reserved. 4.0.30319.17929 C:\Users\Carlos\Desktop>git -version 'git' is not recognized as an internal or external command, operable program or batch file. C:\Users\Carlos\Desktop>git 'git' is not recognized as an internal or external command, operable program or batch file. C:\Users\Carlos\Desktop>cd GitHub C:\Users\Carlos\Desktop\GitHub>cd cordova32 C:\Users\Carlos\Desktop\GitHub\cordova32>cd wp8-plain C:\Users\Carlos\Desktop\GitHub\cordova32\wp8-plain>cordova platform add wp8 Downloading cordova-wp8-dev library for wp8... Checking wp8 requirements... Creating wp8 project... Downloading cordova-wp8-dev library for wp8... Preparing wp8 project C:\Users\Carlos\Desktop\GitHub\cordova32\wp8-plain>cordova build -d Downloading cordova-wp8-dev library for wp8... Generating config.xml from defaults for platform "wp8" Calling plugman.prepare for platform "wp8" Preparing wp8 project Processing configuration changes for plugins. Iterating over installed plugins: [] Writing out cordova_plugins.js... Compiling app on platform "wp8" via command "cmd" /c C:\Users\Carlos\Desktop\GitHub\cordova32\wp8-plain\platforms\wp8\cordova\build WARNING: [ --debug | --release ] not specified, defaulting to debug... Cleaning cordova project... Building Cordova-WP8 Project: Configuration : Debug Directory : C:\Users\Carlos\Desktop\GitHub\cordova32\wp8-plain\platforms\wp8 Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Program Files (x86)\MSBuild\Microsoft\WindowsPhone\v8.0\Microsoft.WindowsPhone.v8.0.Overrides.targets(15,9): error : Building Windows Phone application using MSBuild 64 bit is not supported. If you are using TFS build definitions, change the MSBuild platform to x86. [C:\Users\Carlos\Desktop\GitHub\cordova32\wp8-plain\platforms\wp8\HelloCordova.csproj] ERROR: MSBuild failed to create .xap when building cordova-wp8 for debugging. child_process.spawn(cmd,[/c, C:\Users\Carlos\Desktop\GitHub\cordova32\wp8-plain\platforms\wp8\cordova\build]) = 2 Error: An error occurred while building the wp8 project.ERROR: MSBuild failed to create .xap when building cordova-wp8 for debugging. at ChildProcess.<anonymous> (C:\Users\Carlos\Desktop\GitHub\cordova-cli\src\compile.js:65:22) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:735:16) at Process.ChildProcess._handle.onexit (child_process.js:802:5) C:\Users\Carlos\Desktop\GitHub\cordova32\wp8-plain> So which one is needed it x86 for simulator, and x64 for release? -- This message was sent by Atlassian JIRA (v6.1#6144)