How do I reference index.html from a razor library in a Maui Blazor app?
TimTim
1
Reputation point
How do I reference index.html from a razor library in a Maui Blazor app?
Scenario:
- Create a .net Maui Blazor app and a Razor Class Library.
- Move the wwwroot folder and its content over to the Razor class library from the Maui Blazor app. (I want to have all my static files in one location, that way I only need to have one copy of each file, that I can then share with my MAUI Blazor app, and later a Blazor Server app)
How do I reference the index.html file, now located in the Razor class library, from the MAUI Blazor app?
Original code in the MAUI Blazor app
<BlazorWebView HostPage="wwwroot/index.html">...</BlazorWebView>
New code
<BlazorWebView HostPage="INDEX.HTML FROM RAZOR CLASS LIBRARY WWWROOT??">...</BlazorWebView>