Description
Hi,
- I got missing font OpenSansRegular.ttf although i removed them from project entirely and not appear in C:\Windows\Fonts..
- I got missing font Segoe UI.ttf although it exist in my computer in C:\Windows\Fonts.

Steps to Reproduce
1.Create new MAUI app.
2. Comment
.ConfigureFonts(fonts =>
{
//fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
//fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
and remove these fonts from Resource/Fonts folder.
-
publish the maui as exe:
-
dotnet publish -f net9.0-windows10.0.19041.0 -c Release -p:WindowsPackageType=None -p:WindowsAppSDKSelfContained=true
-p:RuntimeIdentifierOverride=win10-x64
-
I got this results in LOG:
2025-03-19 12:11:52,454 [1] ERROR Microsoft.Maui.FontManager - Error loading font 'Assets/Fonts/OpenSansRegular.ttf'.
System.InvalidOperationException: This operation is not supported for a relative URI.
at System.Uri.get_LocalPath()
at Microsoft.Maui.FontManager.FindFontFamilyName(String fontFile)
2025-03-19 12:11:52,461 [1] ERROR Microsoft.Maui.FontManager - Error loading font 'Assets/Fonts/OpenSansRegular.otf'.
System.InvalidOperationException: This operation is not supported for a relative URI.
at System.Uri.get_LocalPath()
at Microsoft.Maui.FontManager.FindFontFamilyName(String fontFile)
2025-03-19 12:12:10,912 [1] ERROR Microsoft.Maui.FontManager - Error loading font 'Assets/Fonts/Segoe UI.ttf'.
System.InvalidOperationException: This operation is not supported for a relative URI.
at System.Uri.get_LocalPath()
at Microsoft.Maui.FontManager.FindFontFamilyName(String fontFile)
2025-03-19 12:12:10,913 [1] ERROR Microsoft.Maui.FontManager - Error loading font 'Assets/Fonts/Segoe UI.otf'.
System.InvalidOperationException: This operation is not supported for a relative URI.
at System.Uri.get_LocalPath()
at Microsoft.Maui.FontManager.FindFontFamilyName(String fontFile)
Link to public reproduction project repository
No response
Version with bug
9.0.30 SR3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
....
Did you find any workaround?
NO
Relevant log output
Description
Hi,
Steps to Reproduce
1.Create new MAUI app.
2. Comment
.ConfigureFonts(fonts =>
{
//fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
//fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
and remove these fonts from Resource/Fonts folder.
publish the maui as exe:
dotnet publish -f net9.0-windows10.0.19041.0 -c Release -p:WindowsPackageType=None -p:WindowsAppSDKSelfContained=true
-p:RuntimeIdentifierOverride=win10-x64
I got this results in LOG:
2025-03-19 12:11:52,454 [1] ERROR Microsoft.Maui.FontManager - Error loading font 'Assets/Fonts/OpenSansRegular.ttf'.
System.InvalidOperationException: This operation is not supported for a relative URI.
at System.Uri.get_LocalPath()
at Microsoft.Maui.FontManager.FindFontFamilyName(String fontFile)
2025-03-19 12:11:52,461 [1] ERROR Microsoft.Maui.FontManager - Error loading font 'Assets/Fonts/OpenSansRegular.otf'.
System.InvalidOperationException: This operation is not supported for a relative URI.
at System.Uri.get_LocalPath()
at Microsoft.Maui.FontManager.FindFontFamilyName(String fontFile)
2025-03-19 12:12:10,912 [1] ERROR Microsoft.Maui.FontManager - Error loading font 'Assets/Fonts/Segoe UI.ttf'.
System.InvalidOperationException: This operation is not supported for a relative URI.
at System.Uri.get_LocalPath()
at Microsoft.Maui.FontManager.FindFontFamilyName(String fontFile)
2025-03-19 12:12:10,913 [1] ERROR Microsoft.Maui.FontManager - Error loading font 'Assets/Fonts/Segoe UI.otf'.
System.InvalidOperationException: This operation is not supported for a relative URI.
at System.Uri.get_LocalPath()
at Microsoft.Maui.FontManager.FindFontFamilyName(String fontFile)
Link to public reproduction project repository
No response
Version with bug
9.0.30 SR3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
....
Did you find any workaround?
NO
Relevant log output