unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
9.04k stars 734 forks source link

Uno is not strict enough about non-existent resources #17176

Open MartinZikmund opened 5 months ago

MartinZikmund commented 5 months ago

Current behavior

Consider the following in a blank app's MainPage.xaml:

<StackPanel
    HorizontalAlignment="Center"
    VerticalAlignment="Center"
    Background="{ThemeResource NopeNotExisting}">
    <TextBlock
        HorizontalAlignment="Center"
        AutomationProperties.AutomationId="HelloTextBlock"
        Foreground="{StaticResource DoesNotExistAtAll}"
        Text="Hello Uno Platform" />
</StackPanel>

When run, the app starts up fine on Uno targets

Expected behavior

The app crashes on WinUI, we should match this behavior, as this potentially hides issues.

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

Yes

Environment

No response

NuGet package version(s)

No response

Affected platforms

No response

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

MartinZikmund commented 5 months ago

This issue may be even more problematic for Converters:

https://github.com/unoplatform/Uno.Gallery/pull/1116/files#diff-035d07c81e29b43ad51842f2e153c5be6d9d79fe0a6ac7c83979d28b8dc58104L1424-L1427