Open danroth27 opened 1 month ago
This issue has been verified using Visual Studio 17.12.0 Preview 3(9.0.0-rc.2.24473.5). Can repro this issue at Web platform.
Excuse me I do not mean to hijack this issue but does this means that MAUI doesn't have currently the ability to use assets generated with MapStaticAssets()?
I can't find any documentation or keyword like @Assets
specific to MAUI?
On my side I have an existing solution with .NET MAUI Blazor Hybrid and I tried to use the new static web assets support in .NET 9. It works perfectly in Blazor Web but when launched with MAUI, bundles containing component isolated css are not retrieved.
In my App.razor:
<link` rel="stylesheet" href="@Assets["_content/App.Shared/App.Shared.bundle.scp.css"]" />
In my MAUI index.html (obviously missing something):
<link rel="stylesheet" href="_content/App.Shared/App.Shared.bundle.scp.css" />
When looking at MAUI dev network tab, my css file is naturally not looked up with the expected ETag so it ends up with a 404.
Description
The Blazor Web App project in the .NET MAUI Blazor Hybrid and Web App template is still using the older static files middleware. It should be updated to use the new static web assets support in .NET 9 (
MapStaticAssets
& friends) to match the Blazor Web App template.Steps to Reproduce
Expected: Uses
MapStaticAssets()
and friends Actual: UsesUseStaticFiles()
Link to public reproduction project repository
No response
Version with bug
9.0.0-rc.2.24503.2
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
Other (Tizen, Linux, etc. not supported by Microsoft directly)
Affected platform versions
Web
Did you find any workaround?
No response
Relevant log output
No response