UWP resources not found

心已入冬 提交于 2020-01-30 11:52:27

问题


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

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}}

The Output window is showing the following exception

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.

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).


回答1:


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.



来源:https://stackoverflow.com/questions/53523205/uwp-resources-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!