OS: Node Version: v6.5.0
Windows 10 version 1511; 10586.545
Start a clean project :
ionic start testBuildWin10 -v2
cd testBuildWin10
setup config.xml to target windows10 instead of windows 8.1
<platform name="windows">
<preference name="windows-target-version" value="10.0" />
</platform>
At this step, the app works, but failed when adding mfp :
cordova plugin add cordova-plugin-mfp
cordova prepare
ionic run windows
an error ask me to add the argument --archs=x64
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\Eric\Desktop\testBuildWin10-2\hooks\after_prepare\010_add_platform_class.js C:\Users\Eric\Desktop\testBuildWin10-2
add to body class: platform-windows
Building project: C:\Users\Eric\Desktop\testBuildWin10-2\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : debug Platform : anycpuC:\Users\Eric\Desktop\testBuildWin10-2\platforms\windows\CordovaApp.Windows10.jsproj(83,9): error : The following component requires .NET Native compilation which is not available when targeting 'Windows10' and 'AnyCPU'. Consider changing the targeted processor architecture to one of the following: 'x86, x64, ARM' (if you are using command line this could be done by adding '--archs' parameter, for example: 'cordova build windows --archs=x64'). C:\Users\Eric\Desktop\testBuildWin10-2\platforms\windows\plugins\cordova-plugin-globalization\GlobalizationProxy.winmd
Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
then when i run ionic run --archs=x64
C:\Users\Eric\Desktop\testBuildWin10-2\platforms\windows\CordovaApp.Windows10.jsproj(83,9): error : The following component requires .NET Native compilation which is not available when targeting 'Windows10' and 'AnyCPU'. Please consider changing the targeted processor architecture to one of the following: 'x86, x64, ARM' (if you are using command line this could be done by adding '--archs' parameter, for example: 'cordova build windows --archs=x64'). C:\Users\Eric\Desktop\testBuildWin10-2\platforms\windows\plugins\cordova-plugin-globalization\GlobalizationProxy.winmd
Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
Mobilefirst Windows SDK packages with architecture specific DLL's. Hence ionic run windows command will fail as it runs for AnyCPU.
In order to run platform specific commands you need to add -- separator before --archs=x64.
Try with command ionic run windows -- --archs=x64, I hope it should resolve the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With