3

I recently took a stock WinUI template, added my old UWP C# code, recompiled and tried to publish. The Windows Store Application Submission warns me that I shouldn't use the runFullTrust setting:

We detected the use of one or more restricted capabilities in your Package.appxmanifest file. You must request approval to use restricted capabilities by providing more information below. Please include as much detail as possible. Learn more

If you don't need to declare these capabilities or added them in error, you can remove them from your Package.appxmanifest file and then upload the updated package(s).

but here's what I got from the template:

<Capabilities>
  <rescap:Capability Name="runFullTrust" />
</Capabilities>

I tried removing it, but it wouldn't even compile. Can anyone tell us the backstory of this flag, why it's needed in WinUI but not UWP, and how we get around the Windows Store Submission error.

Quark Soup
  • 4,272
  • 3
  • 42
  • 74
  • https://learn.microsoft.com/en-us/windows/uwp/monetize/create-and-manage-submissions-using-windows-store-services – Hans Passant May 03 '22 at 22:19
  • @HansPassant - What was I supposed to get out of a random link to a page that doesn't even contain the keyword with which I'm having trouble? – Quark Soup May 03 '22 at 23:27

2 Answers2

1

Do WinUI applications need runFullTrust to publish to the Windows Store?

Yes.

A WinUI 3 app uses the full-trust desktop app model. A UWP app runs in a sandbox.

As stated in the docs, distributing your packaged desktop (WinUI 3) app requires you to answer "a few extra questions as part of the submission process. That's because your package manifest declares a restricted capability named runFullTrust, and we need to approve your application's use of that capability."

So you should provide information about why you need to use the runFullTrust restricted capability when you publish the app. You could for example explain that it's a desktop app and what it does.

mm8
  • 163,881
  • 10
  • 57
  • 88
1

WinUI 3 does not need to be full trust, but you still need to declare any UWP-like capacities you are using.

Here is a tutorial that shows how to do it.

https://nicksnettravels.builttoroam.com/winui-appcontainer/

Abort_Retry
  • 34
  • 1
  • 5
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 16 '22 at 08:43