Search Unity

App Manifest validation error

Discussion in 'Windows' started by Archtica, Jun 10, 2021.

  1. Archtica

    Archtica

    Joined:
    Mar 23, 2018
    Posts:
    47
    Hello all
    I'm running into a problem building UWP app in Visual Studio. I've build many, many times and never had any problems. Everything is fine with executable only so nothing wrong with app.

    I'm on unity: 2020.3.11.1f building for XAML project
    Visual Studio is: 16.10.1 (Latest)

    In the current build from Unity I get the following added entry in the Package.appxmanifest:
    xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"

    And further down the following is added:
    <Capability Name="broadFileSystemAccess" xmlns="" />

    I've never had these entries in the manifest before and it's causing the following error when I build in Visual Studio:

    D:\GIT\Project - UWP\Build\build\bin\x64\Debug\AppxManifest.xml : error APPX0501: Validation error. error 80080204: App manifest validation error: The document root element m package | win10foundation Package must be defined in the http://schemas.microsoft.com/appx/2010/manifest namespace.

    It is also causing the manifest editor to fail to open the manifest. If I delete these new entries I can build.

    EDIT: Ok changing <Capability Name="broadFileSystemAccess" xmlns="" /> to <rescap:Capability Name="broadFileSystemAccess" /> is allowing it to build. That took forever to find out. Is that a bug that should be reported?
     

    Attached Files:

    Last edited: Jun 10, 2021
  2. timke

    timke

    Joined:
    Nov 30, 2017
    Posts:
    408
    Hey,

    I don't know where that broadFileSystemAccess Capability is coming from; it's not one that Unity exposes.

    Several UWP Capabilities are exposed by Unity in the Player Setting under Publisher section. Any "checked" Capabilities are automatically included in the package manifest when making a "clean" UWP build. Note: we don't overwrite an existing package manifest file (blow away changes you've made) so changes to these settings are only applied on new/clean builds.

    Not all UWP Capabilities are exposed (only the most common ones) and we definitely don't expose broadFileSystemAccess. So something else must've added that Capability to your package manifest.

    Is your package manifest file the one actually generated by Unity or did you copy/import it from somewhere else?
    Are you using any Assets or Plugins that perform Post Build processing in Unity's UWP build?

    Go ahead and file a bug if you want, but I don't think there's anything we can do about this issue because it came from somewhere outside of Unity's UWP Support.

    Finally, does your app actually need this Capability? If not I strong recommend you completely remove it from your package manifest. It's a Restricted Capability that requires additional steps when submitting to the Microsoft Store. That is, Microsoft has to authorize your app to utilize this feature.