Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have two solution
Core and Client
Core contains the fonts and resource dictionary
FE
<MauiFont Include="Resources\Fonts\Kalameh-Black.ttf" />
<MauiXaml Update="Resources\ImageResourceDictionary.xaml"> <Generator>MSBuild:Compile</Generator> </MauiXaml>
I have another project in Core as a TestProject this project can load fonts and the ImageResourceDictionary without any problem but when I pack the project with dotnet the Client project cannot load a font (It is also clear the package size is very small and it doesn't contain fonts)
For the resource dictionary I get this error
'No embeddedresource found for ..Maui.Resources.ImageResourceDictionary'
I added this to the project but no luck!
<Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <hb:ImageResourceDictionary/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources>
My Guess is dotnet pack has problem with Maui or I am missing a step
Update:
LoadFromXaml is working with a debug symbol but it doesn't work with release symbol
I have this code in my class that works if I make a package with debug build but it's not working with Release pack
ResourceDictionary iconDictionary = new ResourceDictionary().LoadFromXaml(typeof(ImageResourceDictionary));
Beta Was this translation helpful? Give feedback.
All reactions