none
How to enable windows 10 target in Ionic Cordova project templates RRS feed

  • Question

  • Hi,

    I have Visual Studio 2015 on Windows 10 machine and when i try to target windows 10 OS version for my cordova app i see only an option for Windows 8.1. How to fix this ?

    I am using Ionic cordova project template in Visual Studio 2015.


    -- ME

    Friday, October 16, 2015 3:09 AM

Answers

  • Ionic cordova project template in Visual Studio 2015 uses cordova version 4.3.1 which doesn't support Windows 10 as a target OS version. You need to upgrade the cordova version to 5.1.1 so you will be able to target windows 10 cordova apps.

    Open taco.json file in your project and you will find the following cordova version that is used by default in the Ionic template:

    {	"cordova-cli": "4.3.1"}

    We need you to change the cordova version to 5.1.1, and then build your project and monitor what is being written in the output window.

    1>------ Build started: Project: IonicCordovaProject1, Configuration: Debug Android ------1>  Your environment has been set up for using Node.js 4.2.1 (x64) and npm.1>  ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac1>  ------ Name from source package.json: vs-tac1>  ------ Version from source package.json: 1.0.131>  ------ Package already installed globally at correct version.1>  ------ Installing Cordova tools cordova@5.1.1 for project from npm. This could take a few minutes...1>  npm WARN engine cordova-js@4.0.0: wanted: {"node":"~0.10.x"} (current: {"node":"4.2.1","npm":"2.7.4"})1>  npm WARN engine npm@1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"4.2.1","npm":"2.7.4"})1>  npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.1","npm":"2.7.4"})1>  npm WARN installMany normalize-package-data was bundled with npm@1.3.4, but bundled package wasn't found in unpacked tree1>  cordova@5.1.1 node_modules\cordova1>  ├── underscore@1.7.01>  ├── q@1.0.11>  ├── nopt@3.0.1 (abbrev@1.0.7)1>  └── cordova-lib@5.1.1 (valid-identifier@0.0.1, unorm@1.3.3, osenv@0.1.0, mime@1.2.11, properties-parser@0.2.3, bplist-parser@0.0.6, semver@2.1.0, dep-graph@1.1.0, shelljs@0.3.0, rc@0.5.2, xcode@0.6.7, through2@0.6.3, npmconf@0.1.16, d8@0.4.4, glob@4.0.6, elementtree@0.1.6, request@2.47.0, tar@1.0.2, init-package-json@1.9.1, cordova-registry-mapper@1.1.12, cordova-app-hello-world@3.9.0, plist@1.1.0, cordova-js@4.0.0, npm@1.3.4)1>  ------ npm install of cordova@5.1.1 from npm completed.1>  ------ Build Settings:1>  ------ Build Settings:1>  ------    platformConfigurationBldDir: C:\github\IonicCordovaProject1\IonicCordovaProject1\bld\Android\Debug1>  ------    platformConfigurationBinDir: C:\github\IonicCordovaProject1\IonicCordovaProject1\bin\Android\Debug1>  ------    buildCommand: prepare1>  ------    platform: Android1>  ------    cordovaPlatform: android1>  ------    configuration: Debug1>  ------    cordovaConfiguration: Debug1>  ------    projectName: IonicCordovaProject11>  ------    projectSourceDir: C:\github\IonicCordovaProject1\IonicCordovaProject11>  ------    npmInstallDir: C:\Users\moelzogh\AppData\Roaming\npm1>  ------    language: en-US1>  ------    changeList.changedFilesIos: res\icons\android\icon-72-hdpi.png,res\screens\android\screen-mdpi-landscape.png,merges\android\scripts\android2.3-jscompat.js,merges\windows\scripts\winstore-jscompat.js,res\icons\ios\icon-60.png,www\js\framework\ionic.bundle.min.js,res\screens\ios\screen-iphone-landscape-736h.png,res\icons\windows\StoreLogo.scale-100.png,res\icons\android\icon-48-mdpi.png,www\templates\tab-dash.html,res\icons\ios\icon-72.png,res\icons\ios\icon-76.png,res\screens\ios\screen-ipad-portrait-2x.png,res\screens\ios\screen-iphone-portrait-2x.png,res\icons\windows\Square71x71Logo.scale-240.png,merges\android\scripts\platformOverrides.js,res\screens\android\screen-hdpi-portrait.png,www\js\app.js,www\templates\chat-detail.html,www\css\index.css,res\icons\windows\StoreLogo.scale-240.png,res\screens\ios\screen-ipad-landscape.png,res\icons\ios\icon-60-3x.png,config.xml,res\screens\wp8\SplashScreenImage.jpg,res\screens\ios\screen-ipad-landscape-2x.png,res\screens\ios\screen-iphone-568h-2x.png,res\icons\windows\Square150x150Logo.scale-100.png,www\templates\tab-chats.html,res\screens\android\screen-ldpi-landscape.png,res\icons\windows\Wide310x150Logo.scale-240.png,res\icons\windows\Wide310x150Logo.scale-100.png,www\img\ionic.png,res\icons\ios\icon-72-2x.png,res\icons\ios\icon-76-2x.png,res\icons\ios\icon-small.png,www\js\controller\controllers.js,res\icons\windows\Square30x30Logo.scale-100.png,www\templates\tab-account.html,res\icons\wp8\Background.png,www\index.html,res\icons\ios\icon-40.png,res\icons\ios\icon-60-2x.png,res\screens\android\screen-ldpi-portrait.png,res\native\android\ant.properties,res\icons\windows\Square310x310Logo.scale-100.png,taco.json,res\icons\windows\Square150x150Logo.scale-240.png,res\icons\android\icon-36-ldpi.png,merges\windows\scripts\platformOverrides.js,res\screens\ios\screen-iphone-portrait.png,Project_Readme.html,res\screens\android\screen-xhdpi-portrait.png,res\icons\ios\icon-50-2x.png,res\icons\ios\icon-57-2x.png,res\icons\ios\icon-50.png,res\icons\ios\icon-57.png,res\icons\ios\icon-small-2x.png,www\css\ionic.css,res\icons\windows\Square70x70Logo.scale-100.png,res\screens\windows\SplashScreen.scale-240.png,res\icons\android\icon-96-xhdpi.png,www\css\style.css,res\icons\wp8\ApplicationIcon.png,res\icons\ios\icon-40-2x.png,res\screens\ios\screen-iphone-portrait-667h.png,res\screens\android\screen-hdpi-landscape.png,res\screens\windows\SplashScreenPhone.scale-240.png,www\js\service\services.js,res\screens\windows\SplashScreen.scale-100.png,res\screens\ios\screen-iphone-portrait-736h.png,res\screens\ios\screen-ipad-portrait.png,res\screens\android\screen-xhdpi-landscape.png,www\templates\tabs.html,res\icons\windows\Square44x44Logo.scale-240.png,res\screens\android\screen-mdpi-portrait.png1>  ------    changeList.deletedFilesIos:1>  ------    changeList.addedPluginsIos:1>  ------    changeList.deletedPluginsIos:1>  ------    changeList.addedPlugins:1>  ------    changeList.deletedPlugins:1>  ------ Platform android already exists1>  ------ Updating plugins1>  ------ Currently installed plugins:1>  ------ Currently installed dependent plugins:1>  ------ Currently configured plugins:1>  ------ Preparing platform: android1>  Generating config.xml from defaults for platform "android"1>  Calling plugman.prepare for platform "android"1>  Preparing android project1>  Processing configuration changes for plugins.1>  Iterating over installed plugins: []1>  Writing out cordova_plugins.js...1>  Wrote out Android application name to "IonicCordovaProject1"1>  deleted: C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-land-hdpi\screen.png1>  deleted: C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-land-ldpi\screen.png1>  deleted: C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-land-mdpi\screen.png1>  deleted: C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-land-xhdpi\screen.png1>  deleted: C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-port-hdpi\screen.png1>  deleted: C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-port-ldpi\screen.png1>  deleted: C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-port-mdpi\screen.png1>  deleted: C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-port-xhdpi\screen.png1>  splash screens: [{"src":"res/screens/android/screen-hdpi-landscape.png","density":"land-hdpi","platform":"android"},{"src":"res/screens/android/screen-ldpi-landscape.png","density":"land-ldpi","platform":"android"},{"src":"res/screens/android/screen-mdpi-landscape.png","density":"land-mdpi","platform":"android"},{"src":"res/screens/android/screen-xhdpi-landscape.png","density":"land-xhdpi","platform":"android"},{"src":"res/screens/android/screen-hdpi-portrait.png","density":"port-hdpi","platform":"android"},{"src":"res/screens/android/screen-ldpi-portrait.png","density":"port-ldpi","platform":"android"},{"src":"res/screens/android/screen-mdpi-portrait.png","density":"port-mdpi","platform":"android"},{"src":"res/screens/android/screen-xhdpi-portrait.png","density":"port-xhdpi","platform":"android"}]1>  copying image from C:\github\IonicCordovaProject1\IonicCordovaProject1\res\screens\android\screen-hdpi-landscape.png to C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-land-hdpi\screen.png1>  copying image from C:\github\IonicCordovaProject1\IonicCordovaProject1\res\screens\android\screen-ldpi-landscape.png to C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-land-ldpi\screen.png1>  copying image from C:\github\IonicCordovaProject1\IonicCordovaProject1\res\screens\android\screen-mdpi-landscape.png to C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-land-mdpi\screen.png1>  copying image from C:\github\IonicCordovaProject1\IonicCordovaProject1\res\screens\android\screen-xhdpi-landscape.png to C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-land-xhdpi\screen.png1>  copying image from C:\github\IonicCordovaProject1\IonicCordovaProject1\res\screens\android\screen-hdpi-portrait.png to C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-port-hdpi\screen.png1>  copying image from C:\github\IonicCordovaProject1\IonicCordovaProject1\res\screens\android\screen-ldpi-portrait.png to C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-port-ldpi\screen.png1>  copying image from C:\github\IonicCordovaProject1\IonicCordovaProject1\res\screens\android\screen-mdpi-portrait.png to C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-port-mdpi\screen.png1>  copying image from C:\github\IonicCordovaProject1\IonicCordovaProject1\res\screens\android\screen-xhdpi-portrait.png to C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-port-xhdpi\screen.png1>  deleted: C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-hdpi\icon.png1>  deleted: C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-ldpi\icon.png1>  deleted: C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-mdpi\icon.png1>  deleted: C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-xhdpi\icon.png1>  copying image from C:\github\IonicCordovaProject1\IonicCordovaProject1\res\icons\android\icon-36-ldpi.png to C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-ldpi\icon.png1>  copying image from C:\github\IonicCordovaProject1\IonicCordovaProject1\res\icons\android\icon-48-mdpi.png to C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-mdpi\icon.png1>  copying image from C:\github\IonicCordovaProject1\IonicCordovaProject1\res\icons\android\icon-72-hdpi.png to C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-hdpi\icon.png1>  copying image from C:\github\IonicCordovaProject1\IonicCordovaProject1\res\icons\android\icon-96-xhdpi.png to C:\github\IonicCordovaProject1\IonicCordovaProject1\platforms\android\res\drawable-xhdpi\icon.png1>  Wrote out Android package name to "io.cordova.myappe2785d518e9f4f6ea03055878dd7a400"========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

    Notice that VS will install all required components for Cordova 5.1.1 runtime.

    After the build is completed, Double click on config.xml file and you will see that you can choose windows 10 as target OS version.

    Now you can test and build windows 10 apps in cordova using VS 2015.

    Enjoy.


    -- ME


    Friday, October 16, 2015 3:15 AM