Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Windows platform build always trying to use Any CPU and getting error

$
0
0

@peterjc wrote:

I have an Ionic application where I have just added the Window platform on a Windows PC that has only Visual Studio 2017 installed.

After some other initial problems (eg this, and this), I think I am up to the last hurdle, and that is I am getting the following error when trying to build (ie running ionic cordova build windows)...

Building project: H:\dev\apps\mobileapps\myapp\trunk\platforms\windows\CordovaApp.Windows10.jsproj
    Configuration : debug
    Platform      : anycpu
    Patching 10 in prebuild event...
    Injected base.js reference to the /www/index.html
    Removing /(
    *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.WinJS.2.0\/js\/base.js">\s*<\/script>)(\s*)/ from
    /www/index.html
    Removing /(
    *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.Phone.WinJS.2.1\/js\/base.js">\s*<\/script>)(\s*)/
    from /www/index.html
    Creating library
    H:\dev\apps\mobileapps\myapp\trunk\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\debug\SQLite3.UWP\SQLite3.UWP.lib
    and object
    H:\dev\apps\mobileapps\myapp\trunk\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\debug\SQLite3.UWP\SQLite3.UWP.exp
    SQLite3.UWP.vcxproj ->
    H:\dev\apps\mobileapps\myapp\trunk\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\debug\SQLite3.UWP\SQLite3.UWP.dll
    SQLite3.UWP.vcxproj ->
    H:\dev\apps\mobileapps\myapp\trunk\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\debug\SQLite3.UWP\SQLite3.UWP.pdb
    (Partial PDB)
    C:\Program Files (x86)\Microsoft Visual
    Studio\2017\Enterprise\MSBuild\15.0\Microsoft.Common.targets\ImportBefore\Microsoft.Cpp.VCLibs120Universal.targets(103,5):
    warning MSB3842: Project "CordovaApp.Windows10" depends upon SDK "Microsoft Universal CRT Debug Runtime
    v10.0.15063.0" which supports apps targeting "UAP 10.0". To verify whether "Microsoft Universal CRT Debug
    Runtime v10.0.15063.0" is compatible with "UAP 10.0.15063.0", contact the SDK author or see
    http://go.microsoft.com/fwlink/?LinkID=309181.
    [H:\dev\apps\mobileapps\myapp\trunk\platforms\windows\CordovaApp.Windows10.jsproj]
    C:\Program Files (x86)\Microsoft Visual
    Studio\2017\Enterprise\MSBuild\15.0\Microsoft.Common.targets\ImportBefore\Microsoft.Cpp.VCLibs120Universal.targets(103,5):
    error MSB3779: The processor architecture of the project being built "Any CPU" is not supported by the
    referenced SDK "Microsoft.UniversalCRT.Debug, Version=10.0.15063.0". Please consider changing the targeted
    processor architecture of your project (in Visual Studio this can be done through the Configuration Manager) to
    one of the architectures supported by the SDK: "x86, x64, ARM, ARM64".
    [H:\dev\apps\mobileapps\myapp\trunk\platforms\windows\CordovaApp.Windows10.jsproj]
    Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe: Command
    failed with exit code 1

Opening the solution in Visual Studio, the solution and project did originally have "Any CPU" set, but I have gone in and tried setting it to both x86 and ARM. I have saved all, and I can build the solution in Visual studio, but when I do the ionic build, it is always complaining about the "any cpu".

My Ionic info is

global packages:

    @ionic/cli-plugin-proxy : 1.3.1
    @ionic/cli-utils        : 1.4.0
    Cordova CLI             : 7.0.1
    Ionic CLI               : 3.4.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.4.0
    @ionic/cli-plugin-ionic-angular : 1.3.1
    Cordova Platforms               : android 6.1.2 ios 4.3.1 windows 5.0.0
    Ionic Framework                 : ionic-angular 3.3.0

System:

    Node       : v6.11.0
    OS         : Windows 10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
    npm        : 3.10.10

I actually thought we would want any CPU, but even if I try to build this in Visual Studio I get an error...

Severity	Code	Description	Project	File	Line	Suppression State
Error	MSB3779	The processor architecture of the project being built "Any CPU" is not supported by the referenced SDK "Microsoft.UniversalCRT.Debug, Version=10.0.15063.0". Please consider changing the targeted processor architecture of your project (in Visual Studio this can be done through the Configuration Manager) to one of the architectures supported by the SDK: "x86, x64, ARM, ARM64".	CordovaApp.Windows10	C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Microsoft.Common.targets\ImportBefore\Microsoft.Cpp.VCLibs120Universal.targets	103

I will look into this separately, but for now, would like to know how to build with the x86 (or ARM - not sure which I should use to make it generic for any many devices as possible)

Does anyone have any ideas how I can get around this?

Thanks in advance!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>