cordova-windows icon indicating copy to clipboard operation
cordova-windows copied to clipboard

Windows: uap capability included when building for 8.1

Open andreszs opened this issue 5 years ago • 0 comments

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

[email protected]

Version information

[email protected]

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

andreszs avatar Oct 07 '20 21:10 andreszs