Forum Discussion

TIMOTHY_MANGAN's avatar
Jun 08, 2022

WAP Capabilities missing

I am building an MSIX project using the Windows Application Package under Visual Studio.

 

The application exe is an administrator tool that has a manifest requiring admin.  Yes, I know that won't fly in the Microsoft Store, but this is for Sideloading.

 

The .wapproj editor in Visual Studio does not expose all capabilities.  Manually editing the file to add in the "allowElevation" capability results in a validation error when publishing for sideloading (error below).

 

As I know that I can run Makemsix with this capability added when building the package using third party tooling, this seems to be at least an oversite.  The AppXManifest is valid according to the published schemas.

 

Severity Code Description Project File Line Suppression State
Error Validation error. error C00CE169: App manifest validation error: The app manifest must be valid as per schema: Line 33, Column 21, Reason: 'allowElevation' violates enumeration constraint of 'documentsLibrary picturesLibrary videosLibrary musicLibrary enterpriseAuthentication sharedUserCertificates userAccountInformation removableStorage appointments contacts phoneCall blockedChatMessages objects3D voipCall chat'. The attribute 'Name' with value 'allowElevation' failed to parse. StratodeskWAP C:\Users\Tim\source\repos\StratodeskWrapper\StratodeskInstallWrapper\StratodeskWAP\bin\AnyCPU\Release\AppxManifest.xml 1

 

  • [Replying to my own post. I am a bad person...]
    The issue was that I forgot that allowelevation is part of the rescap schema extension and not uap extension. Fixing this resolved the issue.

    So in case someone else has a similar issue, the technique was to create the WAP project, and then manually edit the Package.appxmanifest file to add in the needed capability. You'll find a capabilities element with at least the "runFullTrust" capability (which is also part of the rescap schema extension, so you can just copy/paste and change the name. Other capabilities that you might want to add manually might be under different extensions, so check.
  • [Replying to my own post. I am a bad person...]
    The issue was that I forgot that allowelevation is part of the rescap schema extension and not uap extension. Fixing this resolved the issue.

    So in case someone else has a similar issue, the technique was to create the WAP project, and then manually edit the Package.appxmanifest file to add in the needed capability. You'll find a capabilities element with at least the "runFullTrust" capability (which is also part of the rescap schema extension, so you can just copy/paste and change the name. Other capabilities that you might want to add manually might be under different extensions, so check.

Resources