未找到 UWP 资源 [英] UWP resources not found

查看:40
本文介绍了未找到 UWP 资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 UWP 应用程序,它在多台机器上都运行良好,但在一台特定的机器上,它无声无息地崩溃了.

I have an UWP application which is working fine on various machines but on one particular machine, it is crashing silently.

当我通过 Visual Studio 调试已安装的应用程序时,我发现它没有获取 XAML 文件中的资源,例如

When I debugged the installed app through visual studio I figured out that it is not getting the resources on the XAML file e.g

{ThemeResource ComboBoxDropdownContentMargin}

{Binding TemplateSettings.DropDownContentMinWidth, RelativeSource={RelativeSource Mode=TemplatedParent}}

输出窗口显示以下异常

在 0x751641E8 (KernelBase.dll) 处抛出异常我的应用程序名称已更改.exe: 0x40080201: WinRT 来源错误(参数:0x80004005、0x00000046、0x05CDC7A8).抛出异常Infonet.CStoreCommander.UI.exe 中的 0x751641E8 (KernelBase.dll):0x40080201:WinRT 源错误(参数:0x802B000A、0x0000005C、0x05CDC73C).120|2018-11-28T14:45:50.1043744+00:00|INFO|2|App|.UnhandledExceptionHandler行:59 未处理的异常 -->Windows.UI.Xaml.Markup.XamlParseException:与找不到此错误代码.

Exception thrown at 0x751641E8 (KernelBase.dll) in myapplicationnamechanged .exe: 0x40080201: WinRT originate error (parameters: 0x80004005, 0x00000046, 0x05CDC7A8). Exception thrown at 0x751641E8 (KernelBase.dll) in Infonet.CStoreCommander.UI.exe: 0x40080201: WinRT originate error (parameters: 0x802B000A, 0x0000005C, 0x05CDC73C). 120|2018-11-28T14:45:50.1043744+00:00|INFO|2|App|.UnhandledExceptionHandler line:59 Unhandled Exception --> Windows.UI.Xaml.Markup.XamlParseException: The text associated with this error code could not be found.

找不到名称/键为 ComboBoxDropdownContentMargin 的资源[行:0 位置:0] 0x0F7F2DEB 处未处理的异常(Windows.UI.Xaml.dll) 在 Infonet.CStoreCommander.UI.exe: 0xC000027B:发生了应用程序内部异常(参数:0x116F1BA8, 0x00000004).

Cannot find a Resource with the Name/Key ComboBoxDropdownContentMargin [Line: 0 Position: 0] Unhandled exception at 0x0F7F2DEB (Windows.UI.Xaml.dll) in Infonet.CStoreCommander.UI.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x116F1BA8, 0x00000004).

推荐答案

根据 MSDN 文档 ComboBoxDropdownContentMargin 已从 Windows 10 版本 1511(Windows SDK 版本 10.0.10586.0)提供.

As per this MSDN documentation ComboBoxDropdownContentMargin was made availalbe from Windows 10, Version 1511 (Windows SDK version 10.0.10586.0).

因此,如果您运行的应用版本低于支持的版本,在这种情况下,它会抛出异常.

So if you are running your App which has Version lower than the supported version, in that case, it will throw an exception.

这篇关于未找到 UWP 资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆