ionic-team / ionic-app-scripts

App Build Scripts for Ionic Projects
http://ionicframework.com/
MIT License
608 stars 304 forks source link

Windows build does not seem to pass on the --arch agument #1109

Open pjc2007 opened 7 years ago

pjc2007 commented 7 years ago

Note: for support questions, please use one of these channels:

https://forum.ionicframework.com/ http://ionicworldwide.herokuapp.com/

Short description of the problem:

I am trying to build for Windows 10, but keep getting an error to do with "Any CPU"

H:\dev\Pitram\mobileapps\pitramconnect\trunk\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\release\SQLite3.UWP\SQLite3.UWP.dll
        C:\Program Files (x86)\Microsoft Visual
        Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(4980,5):
        error APPX0505: The processor architecture of your project 'neutral' doesn't match the processor architecture
        'x86' of the referenced project 'SQLite3.UWP'. Change the targeted processor architectures to align between your

I have an outline of it on the forum here

What behavior are you expecting?

For the build to succeed.

Steps to reproduce:

  1. Create an ionic application
  2. Add windows plaftorm
  3. call ionic cordova build windows --release --arch=x86 Which @ionic/app-scripts version are you using? 1.3.7

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc) It seems that the ionic call is not passing the command to cordova. When I run ionic cordova build windows --release --arch=x86 I see it calling cordova build windows --release ie without the --arch=x86 flag

If I manually call cordova build windows --release --arch=x86 it then seems to build.

ghost commented 7 years ago

Hey @pjc2007 . You can just pass the argument with "--" like this: ionic cordova build windows --release -- --archs="x64" Then the cordova command should look like: cordova build windows "--archs=x86 x64 arm"

Greetings!

pjc2007 commented 7 years ago

Thanks @GabbaBungo yes that works! Very weird having the double double-dash, but this works. Cheers