No embedded resource found
The fix that worked for me was the following
In the main project .csproj
file, I found that all my .xaml
files where formatted like this :
<EmbeddedResource Include="Source\Home\HomeContentView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
Except one, the one that was failing had an extra line which looked like this
<LogicalName>MyProject.Home.HomeContentView.xaml</LogicalName>
Removing this line fixed the issue. I also saved my files, cleaned and rebuilt the project.
It's a bug. For some reason its status is RESOLVED FIXED, but it doesn't seem fixed at all. On XS on mac anyway.
As a workaround, the file that the exception is thrown in, SomeClass.g.cs, just make an edit to that one generated file, save it, and build again. A bit faster than rebuilding everything.
Of course this means every time you change a .xaml file, you have to build twice.
I had a similar error and fixed it by correcting the class name in my xaml file. I mean in the x:Class attribute of my page.