Closed estaylorco closed 6 years ago
Looks like Resharper is getting confused - that XAML is perfectly valid (s:ApplicationLoader is a ResourceDictionary, and it's valid to have a ResourceDictionary assigned to the Application's Resources property).
You can also try this, see if Resharper likes it:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<s:ApplicationLoader>
<s:ApplicationLoader.Bootstrapper>
<local:Bootstrapper/>
</s:ApplicationLoader.Bootstrapper>
</s:ApplicationLoader>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
That did the trick! You know, I was close: I did manage to get to the ResourceDictionary, but I hadn't thought to go further with MergedDictionaries. I will bring this to the attention of the Resharper team.
Thank you!
Hello,
(Using VS 2017 and .Net 4.7)
I started with nothing but your Startup NuGet package (and the Stylet NuGet package, of course). App.XAML looks like this:
There is a red squiggly line under. The complaint is that a key is necessary. When I add one, however, the new complaint is that ApplicationLoader must be a member of a resource dictionary in order to have a key. When I surround the ApplicationLoader with a resource dictionary, that solves the problem: all squigglies disapper. But no window appears when the application runs.
Also, despite the red squiggly (before surrounding with a dictionary), the application still runs. Resharper/VS reports an actual error in the App.XAML file, which is disconcerting.
What's going on here?
Thank you.