Replies: 1 comment
-
I am running into exact same problem randomly. Created basic Maui App with VS2022.
For some reason the app suddenly stops seeing these defined static resources even though the App.xaml creates the resource dictionary:
If I copy the Color entry with key Primary to the Styles.xaml then the "StaticResource not found for key Primary" goes wasy and it then says "StaticResource not found for key Gray200". The Maui.App compiles fine, the error is on deployment when I try to run the app. When I removed constructor injection on the MainPage the error went away and app deployed and ran fine. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to follow creation of a content-template (manual: ContentView). I have no compile errors, but start of application traps with exception: "StaticResource not found for key Primary".
Primary is the first color of provided resourcedictionary, which i haven't touched.
Could this error happen as some kind of timing errors?
I added the content-template to app.xaml - to be able to use it at various pages.
When I look at the call stack, the exception happens in generated code. Last known code from my project is
App.InitializeComponent();
Beta Was this translation helpful? Give feedback.
All reactions