Tuesday, 21 June 2016

Component requires .NET Native compilation, not available targeting Windows10, AnyCPU

I've been having more pain with Cordova for Windows phones. I updated my Cordova CLI to 6.2.0 to overcome a problem I was having in Cordova/lib/prepare.js when building. It seems to work, but then a new problem appeared - or perhaps it was the same problem but with a more friendly message:

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: 'cordo va build windows --archs=x64'). C:\PathToMyProject\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
To overcome this I had to do what it said. The following command created a successful build:

cordova build windows --archs=x86 

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!