【发布时间】:2016-01-11 10:02:03
【问题描述】:
我正在使用 Visual Studio 2015 Community、c# 和 XAML 开发 Windows 10 应用商店 Windows 通用应用程序。它正在解压缩一个压缩文件并显示其中找到的图像。
构建提供 0 个警告。
无论输入文件大小如何,调试版本都能正常运行。
发行版在典型的输入文件大小下运行良好。
对于较大的输入文件大小(约 100 个 1 兆像素图像),发布版本始终崩溃,并在 appname.exe 中出现“0x55E9A305 (Windows.UI.Xaml.dll) 处的未处理异常:0xC000027B:发生应用程序内部异常” (参数:0x127DC468、0x00000005)。
当用户尝试显示第二张图片时会发生崩溃。至此,所有解压完毕,所有位图均已创建完毕。
我已经修改了构建设置,并将差异缩小到“使用 .NET 本机工具链编译”选项。如果选中该选项,应用程序将崩溃。如果未选中该选项,则应用程序运行良好。
总而言之,该应用程序使用了大约 400 MB 的堆,所以虽然不小,但还没有接近机器的容量。
“所以取消选中该选项!”,我听到你哭了。取消选中该框会导致认证失败,如下所示:
FAILED
Supported APIs
• Error Found: The supported APIs test detected the following errors:
-API OpenSemaphore in api-ms-win-core-synch-l1-1-0.dll is not supported for this application type. System.Threading.dll calls this API.
-API CreateSemaphore in api-ms-win-core-kernel32-legacy-l1-1-0.dll is not supported for this application type. System.Threading.dll calls this API.
-API ExecuteAssembly in uwphost.dll is not supported for this application type. StupidTest.exe calls this API.
-API DllGetActivationFactory in uwphost.dll is not supported for this application type. StupidTest.exe has an export that forwards to this API.
如果没有选择 Compile .Net Native 工具链,空项目也会遭受同样的失败。
所以我的问题:
Universal Apps 必须使用 Compile .Net Native 工具链吗?
是否有任何关于内部异常中参数含义的文档或我可以求助的其他地方进行故障排除?
简而言之,对于摆脱“如果被选中它不起作用,但你必须选择它才能获得认证”的困境,我发现自己有什么建议吗?
【问题讨论】:
-
我也有同样的问题,@sillyrobot 你解决了吗?
-
每当您看到此内容时,请尝试更新您的 Microsoft.NETCore.UniversalWindowsPlatform nuget 包,其中包含最新的 .net 本机编译器。这样做通常会解决您的问题。