By default the
cordova build
command produces two packages: Windows 8.1 and Windows Phone 8.1. To upgrade Windows package to version 10 the following configuration setting must be added to configuration file (config.xml
). name="windows-target-version" value="10.0" />
Once you add this setting
build
command will start producing Windows 10 packages.
You may decide that you want to build a particular version of your application targeting a particular OS (for example, you might have set that you want to target Windows 10, but you want to build for Windows Phone 8.1). To do this, you can use the
--appx
parameter:cordova build windows -- --appx=8.1-phone
The build system will ignore the preference set in config.xml for the target Windows version and strictly build a package for Windows Phone 8.1.
Valid values for the
--appx
flag are 8.1-win
, 8.1-phone
, and uap
(for Windows 10 Universal Apps). These options also apply to the cordova run
command.