You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if there is an error with a resource string in XAML, the app will run fine while debugging. However, when you try to run the app without the debugger, it will crash.
Ideally, the application should not compile or at least crash in debug; it's VERY frusterating to try and find the error without the debugger.
Recording.2024-01-19.145412.compressed.mp4
I've noticed this issue on "StaticResource" strings, "Translation" strings and other custom Provider extension strings. There could be other XAML issues that compile and run successfully in debug, but it's difficult to ascertain.
This COULD be related to Hot Reload, I haven't tried without it. I also have only tested Android Emulator, Physcal Android Device, and Physical iOS Device (both remote and local).
Steps to Reproduce
Create a new MAUI project
Add a BackgroundColor to the button, or some other element using a Static Resource that does not exist (e.g. <Button BackgroundColor="{StaticResource blooper}"/><!-- static resource that does not exist -->)
Run the Project in Debug
Expected Result: App should crash or not compile
Actual Result: App runs as if everything is hunky-dory
Further issues: App crashes when run without the debugger
Link to public reproduction project repository
No link required, can be replicated with a fresh project very easily.
Version with bug
8.0.6
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
No response
Did you find any workaround?
Windows properly throws an exception during runtime, and will even tell you the position in xaml of the error. If possible, maintain windows as a viable platform, even if your app is mobile only.
Description
if there is an error with a resource string in XAML, the app will run fine while debugging. However, when you try to run the app without the debugger, it will crash.
Ideally, the application should not compile or at least crash in debug; it's VERY frusterating to try and find the error without the debugger.
Recording.2024-01-19.145412.compressed.mp4
I've noticed this issue on "StaticResource" strings, "Translation" strings and other custom Provider extension strings. There could be other XAML issues that compile and run successfully in debug, but it's difficult to ascertain.
This COULD be related to Hot Reload, I haven't tried without it. I also have only tested Android Emulator, Physcal Android Device, and Physical iOS Device (both remote and local).
Steps to Reproduce
Create a new MAUI project
Add a BackgroundColor to the button, or some other element using a Static Resource that does not exist (e.g.
<Button BackgroundColor="{StaticResource blooper}"/><!-- static resource that does not exist -->)Run the Project in Debug
Expected Result: App should crash or not compile
Actual Result: App runs as if everything is hunky-dory
Further issues: App crashes when run without the debugger
Link to public reproduction project repository
No link required, can be replicated with a fresh project very easily.
Version with bug
8.0.6
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
No response
Did you find any workaround?
Windows properly throws an exception during runtime, and will even tell you the position in xaml of the error. If possible, maintain windows as a viable platform, even if your app is mobile only.
Relevant log output
No response