我最近采用了一个库存的Winui模板,添加了我的旧UWP C#代码,重新编译并尝试发布。 Windows Store应用程序提交警告我,我不应该使用 Runfulltrust 设置:
我们检测到包装中的一个或多个限制功能。appxManifest文件。您必须通过在下面提供更多信息来要求批准使用限制功能。请包括尽可能多的细节。了解更多
如果您不需要声明这些功能或错误地添加它们,则可以从软件包中删除它们。AppxManifest文件,然后上传更新的软件包。
但这是我从模板中得到的:
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
我尝试将其删除,但它甚至不会编译。谁能告诉我们此标志的背景故事,为什么在Winui中需要它而不是UWP需要,以及我们如何在Windows商店提交错误中遇到。
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.
发布评论
评论(2)
是的。
Winui 3应用程序使用全值桌面应用程序模型。 UWP应用程序在沙箱中运行。
如 docs ,分发包装的桌面(winui 3)应用程序需要您回答” 作为提交过程的一部分。
runfulltrust
,我们需要批准您的应用程序对该功能的使用。发布该应用程序。例如,您可以说明这是一个桌面应用程序及其功能。
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.winui 3 不需要完全信任,但是您仍然需要声明任何UWP - 您正在使用的能力。
这是一个显示如何做的教程。
https://nicksnettravels.builtttravels.builttoroam.com/winui-appcontainer/winui-appcontainer/
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/