cordova-windows
cordova-windows copied to clipboard
Windows: uap capability included when building for 8.1
Bug Report
Problem
Whenever a windows build with the windows 8.1 sdk is attemped, the process fails with this error:
error:package.windows.appxmanifest(35,18): error APPX1402: Content of the file 'package.windows.appxmanifest' is not well-formed XML. 'uap' is an undeclared prefix. Line 35, position 18. [D:\Cordova\TestApp\platforms\windows\CordovaApp.Windows.jsproj]
The problem is that package.windows.appxmanifest and other manifest files are created with this Windows 10-SDK-specific option:
<Extensions>
<uap:Extension Category="windows.protocol" StartPage="www/index.html">
<uap:Protocol Name="net.argim.app" />
</uap:Extension>
</Extensions>
Information
Using this option in config.xml to get a Windows 8.1 SDK build:
<preference name="windows-target-version" value="8.1" />
Command or Code
cordova build windows
Environment, Platform, Device
Version information
Proposed solution
Remove the <Extensions> section from the manifest for non-Windows 10 SDK builds.
Checklist
- [X] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [X] I included all the necessary information above