【发布时间】:2017-03-08 10:52:50
【问题描述】:
有人明白下面这段话想说什么吗?
我必须做些什么才能消除此错误,以便我可以在 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
发现错误:支持的 API 测试检测到以下错误:
System.UnauthorizedAccessException: 访问路径 'C:\Program 文件 (x86)\Windows Kits\10\App 认证 Kit\SupportedAPIs-x64.xml' 被拒绝。在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess 访问、Int32 权限、布尔用户权限、FileShare 共享、Int32 bufferSize,FileOptions 选项,SECURITY_ATTRIBUTES secAttrs,字符串 msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 在 System.IO.FileStream..ctor(字符串路径,FileMode 模式,FileAccess 访问,文件共享共享,Int32 bufferSize)在 System.Xml.XmlDownloadManager.GetStream(Uri uri,ICredentials 凭据,IWebProxy 代理,RequestCachePolicy 缓存策略)在 System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri,字符串角色,类型 ofObjectToReturn) 在 System.Xml.XmlTextReaderImpl.OpenUrlDelegate(对象 xmlResolver)在 System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode 代码,CleanupCode backoutCode,对象 userData)在 System.Threading.CompressedStack.Run(CompressedStack 压缩栈, ContextCallback 回调,对象状态)在 System.Xml.XmlTextReaderImpl.OpenUrl() 在 System.Xml.XmlTextReaderImpl.Read() 在 System.Xml.XmlLoader.Load(XmlDocument 文档,XmlReader 阅读器,布尔值 preserveWhitespace)在 System.Xml.XmlDocument.Load(XmlReader 阅读器) 在 System.Xml.XmlDocument.Load(字符串文件名) Microsoft.Windows.SoftwareLogo.Tests.SupportedApis.SupportedApis.GetNativeAllowList() 在 Microsoft.Windows.SoftwareLogo.Tests.SupportedApis.SupportedApis.ExecuteSharedTests(EnumApplicationType appType,字符串 packageFullName) 在 Microsoft.Windows.SoftwareLogo.Tests.SupportedApis.SupportedApis.Test(UapApp uapApp)在 Microsoft.Windows.SoftwareLogo.TestBase.TestBase.ExecuteTest() [HRESULT 0x80131604] 测试操作失败:'ExecuteTest'。
如果不修复会产生影响:使用不属于 Windows SDK 的 API 对于 Windows 应用商店应用程序违反了 Windows 应用商店认证 要求。
如何解决:查看错误消息以识别不正确的 API Windows 应用商店应用程序的 Windows SDK 的一部分。请注意,应用程序 在调试配置中构建或未启用 .NET Native (如果适用)可能无法通过此测试,因为这些环境可能会拉 在不受支持的 API 中。在发布配置中重新测试您的应用,以及 如果适用,启用 .NET Native。有关更多信息,请参阅下面的链接 信息:Windows 应用商店应用中 Windows API 的替代方案。
【问题讨论】:
-
您是否以管理员身份运行?程序是如何运行的?无论正在运行的应用程序都无权访问该目录。
-
我以管理员身份运行。首先,我创建了一个应用程序包(Windows 商店提交所需的)。接下来,它提示我运行一系列测试,以便它可以通过 Windows 商店认证。当我完成测试时,这是唯一失败的部分。我不知道这意味着什么。我只知道我找不到错误。