Improve debugging experience for missing resource #6073
Labels
area-ErrorHandling
Issues related to error reporting and debugging
feature proposal
New feature proposal
product-winui3
WinUI 3 issues
team-Markup
Issue for the Markup team
v1.0.0-preview2
Milestone
Describe the bug
In the following example I am using a ListView with a custom DataTemplate but such template is using a StaticResource which isn't defined. The result is an unhandled exception which doesn't give enough details to the developer to debug the problem.
Steps to reproduce the bug
Define and use a DataTemplate which uses an undefined StaticResource like in the example below (SmallFontSize isn't defined anywhere).
Expected behavior
I expect the behavior to be notifying the developer that the StaticResource can't be found or that something is wrong with the DataTemplate.
For example if the missing StaticResource is used by a control and not in a DataTemplate definition, the Exception Thrown says that XAML parsing failed.
Screenshots
The example
The exception
NuGet package version
WinUI 3 - Windows App SDK 0.8: 0.8.0 (If you're seeing your issue in older previews of WinUI 3, please try this release)
Windows app type
Device form factor
Desktop
Windows version
May 2021 Update (19043)
Additional context
I am using the single project template from WindowsAppSDK 1.0 Preview 2 but I have the same behaviour using the Microsoft.ProjectReunion.WinUI 0.8.4 nuget with the app+package template.
The text was updated successfully, but these errors were encountered: