Good evening! I had the same issue, and after hours of trying different things (haha), I finally managed to fix it by updating the .csproj
file in the main project. Initially, I had:
<!-- Custom Fonts --> <MauiFont Include="Resources\Fonts*" />
But what worked for me was specifying each font individually like this:
<ItemGroup>
<MauiFont Include="Resources/Fonts/LexendDeca-Black.ttf" Alias="Black" />
<MauiFont Include="Resources/Fonts/LexendDeca-Bold.ttf" Alias="Bold" />
<MauiFont Include="Resources/Fonts/LexendDeca-ExtraBold.ttf" Alias="ExtraBold" />
<MauiFont Include="Resources/Fonts/LexendDeca-ExtraLight.ttf" Alias="ExtraLight" />
<MauiFont Include="Resources/Fonts/LexendDeca-Light.ttf" Alias="Light" />
<MauiFont Include="Resources/Fonts/LexendDeca-Medium.ttf" Alias="Medium" />
<MauiFont Include="Resources/Fonts/LexendDeca-Regular.ttf" Alias="Regular" />
<MauiFont Include="Resources/Fonts/LexendDeca-SemiBold.ttf" Alias="SemiBold" />
<MauiFont Include="Resources/Fonts/LexendDeca-Thin.ttf" Alias="Thin" />
<MauiFont Include="Resources/Fonts/MaterialIcons.ttf" Alias="MaterialIcons" />
</ItemGroup>
After making this change, the icons finally displayed correctly in Release mode, and I got rid of the issue where only an "X" would appear instead of the icon. I hope this helps someone else! Best regards.