Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
Master, 3.2.0
-
None
-
None
-
Windows 8 Pro x64
Description
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?
Attachments
Issue Links
- is related to
-
CB-5224 Fix invalid pattern for testing msbuild availability for wp7 - localization!
- Closed
-
CB-4524 .NET Framework version detected incorrectly
- Closed
-
CB-5024 Windows8 CLI .NET Framework Error
- Closed
-
CB-4618 Cordova CLI can't create wp8 project from template
- Closed
-
CB-5476 use cordova cli create wp8 project failed not support simple chinese windows system
- Closed