.net - 创建应用程序包时出错

标签 .net vb.net uwp

有人明白下面这段话想说什么吗?

我需要做什么才能消除此错误,以便我可以在 Windows 应用商店上提交我的应用程序?

任何解决方案都可能有帮助。谢谢!

'Libraries imported are as follows:
Imports Windows.Storage
Imports Windows.Web.Http
Imports Windows.UI.Popups
Imports Windows.Security.Cryptography
Imports System.Text
Imports System.Numerics
Imports WinRTXamlToolkit.Controls.DataVisualization.Charting

Error Found: The supported APIs test detected the following errors:

System.UnauthorizedAccessException: Access to the path 'C:\Program Files (x86)\Windows Kits\10\App Certification Kit\SupportedAPIs-x64.xml' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) at System.Xml.XmlTextReaderImpl.OpenUrl() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.Load(String filename) at Microsoft.Windows.SoftwareLogo.Tests.SupportedApis.SupportedApis.GetNativeAllowList() at Microsoft.Windows.SoftwareLogo.Tests.SupportedApis.SupportedApis.ExecuteSharedTests(EnumApplicationType appType, String packageFullName) at Microsoft.Windows.SoftwareLogo.Tests.SupportedApis.SupportedApis.Test(UapApp uapApp) at Microsoft.Windows.SoftwareLogo.TestBase.TestBase.ExecuteTest() [HRESULT 0x80131604] Test operation failed: 'ExecuteTest'.

Impact if not fixed: Using an API that is not part of the Windows SDK for Windows Store apps violates the Windows Store certification requirements.

How to fix: Review the error messages to identify the API that is not part of the Windows SDK for Windows Store apps. Please note, apps that are built in a debug configuration or without .NET Native enabled (where applicable) can fail this test as these environments may pull in unsupported APIs. Retest your app in a release configuration, and with .NET Native enabled if applicable. See the link below for more information: Alternatives to Windows APIs in Windows Store apps.

最佳答案

也遇到过同样的问题。文件 SupportedAPIs-x64.xml 的所有者已设置为 none,因此我将其更改为 SYSTEM。此外,在“权限”下,有一行 SYSTEM,而该主体的其他列为空。还有一个主系统,其他列都可以。所以我删除了第一个 SYSTEM 主体,一切正常。 只需打开该文件的属性,然后在“安全性”下单击“高级”按钮。 基本上,我将该文件的权限与 SupportedAPIs-x86.xml 的权限进行了比较。 尝试用记事本打开该文件,如果可以的话。

关于.net - 创建应用程序包时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40256071/

相关文章:

xml - 以XML返回不同的路径

c# - 始终在 UWP 中的 FlipView 控件上显示导航箭头

xaml - 垂直居中文本(TextBlock)

c# - 如何合并 ThreadLocal<T> 中的所有值?

c# - 在 ExecuteFunction SP 调用中使用 unicode 参数

.net - asp.net应用程序的多用户XML文档 “database”

asp.net - 将字符串转换为 SqlDbType

c# - 空文字的类型是什么?

vb.net - 条件表达式中的数据类型不匹配

c# - 负载包含具有相同目标路径的文件