Robert MacLean
24 September 2015
If you have VS 2015 and you have installed Update 2, you may run into a painful bug trying to do builds for the Windows 10 store where they just fail with the following errors:
1>MakeAppx : error : The mapping file can't be parsed. The error occurs at line 3. [app\platforms\windows\CordovaApp.Windows10.jsproj] 1>MakeAppx : error : Package creation failed. [app\platforms\windows\CordovaApp.Windows10.jsproj] 1>MakeAppx : error : 0x8007000b - An attempt was made to load a program with an incorrect format. [app\platforms\windows\CordovaApp.Windows10.jsproj] 1>MDAVSCLI : error : Error code 1 for command: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild with args: app\platforms\windows\CordovaApp.Windows10.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=debug,/p:Platform=x86 1> Command finished with error code 2: cmd /s /c "app\platforms\windows\cordova\build.bat --debug --archs=x86 --win --buildConfig=app\build.json" 1>ERROR building one of the platforms : error : cmd: Command failed with exit code 2 1> You may not have the required environment or OS to build this project 1>MDAVSCLI : error : cmd: Command failed with exit code 2
The solution to this is two fold:
First you need to change the Cordova version to 5.3.1 in the config.xml
Second you need to open the config.xml in the XML editor (select it in Solution Explorer and press F7) and near the bottom you will find the node vs:platformSpecificValues, delete it and all it contains.
You should now be able to do a Windows 10 build that can be uploaded to the store.