Replies: 1 comment
-
|
@aks14621 I think your NuGet does not include the Font, the same way you manually include them in MAUI. CoPilot says something about this:
However, I only included NuGet that includes a file, that a specific content type is set, so the MAUI does include it in the build process. How it is done in the NuGet I do not know. Maybe this does help you a bit, to get started in the right direction. |
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.
-
Hi everyone,
I have a .NET MAUI app that references a class library containing embedded resources (fonts and HTML files). When the library is added as a project reference, everything works fine, fonts register correctly, and HTML content loads in a
WebView.However, when the same library is consumed as a NuGet package, the resources are not found at runtime. The app fails to locate fonts and HTML files from the external assembly.
I suspect this relates to how .NET MAUI or the platform build pipelines handle resource resolution across assemblies. Before implementing a workaround (like moving resources into the main app), I’d like to confirm the expected behavior.
Question
WebViewor font registration)?Additional Details
EmbeddedResourcein the library’s.csproj.MauiProgram.cswhen using project references.Goal
We want to know if cross-assembly resource access is supported or if resources must reside in the app’s assembly. Guidance from Microsoft or the community will help us decide whether to restructure our shared resource approach.
Beta Was this translation helpful? Give feedback.
All reactions