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

config-file tag removed from config.xml is not removed from appxmanifest

Open dominic-simplan opened this issue 5 years ago • 3 comments

Bug Report

Problem

What is expected to happen?

Removing a <config-file> element from the config.xml should be reflected in the AppxManifest.xml / package.*.appxmanifest file after running the build command.

What does actually happen?

Having for example this configuration in the main config.xml:

<platform name="windows">
        <config-file parent="/Package/Capabilities" target="package.appxmanifest">
            <Capability Name="allJoyn" />
        </config-file>
    </platform>

And then removing this element and building the application with cordova build windows -- --archs="x64" will:

  • Update the platforms\windows\config.xml correctly
  • Not remove the according element from the platforms\windows\windows.json file
  • Not remove the according Capability element from the package.*.appxmanifest files

Information

Environment, Platform, Device

Windows 10

Version information

Cordova 8.1.2 Cordova-windows 6.0.1 and 7.0.0

Might be related to #336. Not sure if this is a bug or if I am expected to readd the platform after making changes to the config.xml file... in case of the latter, feel free to close these two issues...

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

dominic-simplan avatar May 16 '19 12:05 dominic-simplan

Will try to reproduce and report back.

janpio avatar Jul 04 '19 15:07 janpio

Similar to https://github.com/apache/cordova-windows/issues/336 I can also not reproduce this: https://github.com/apache/cordova-windows/issues/336#issuecomment-508737522

platforms/windows/windows.json has some leftovers of the munges, but that seems harmless:

    "files": {
      "package.phone.appxmanifest": {
        "parents": {
          "/Package/Capabilities": []
        }
      },
      "package.windows.appxmanifest": {
        "parents": {
          "/Package/Capabilities": []
        }
      },
      "package.windows10.appxmanifest": {
        "parents": {
          "/Package/Capabilities": []
        }
      }
    }

(Again, using Cordova CLI 9 for testing.)

janpio avatar Jul 05 '19 12:07 janpio

Ping @dominic-simplan

janpio avatar Jul 11 '19 17:07 janpio

We are archiving this repository following Apache Cordova's Deprecation Policy. We will not continue to work on this repository. Therefore all issues and pull requests are being closed. Thanks for your contribution.

timbru31 avatar Jan 09 '23 07:01 timbru31