dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.18k stars 1.74k forks source link

Update .NET MAUI Blazor Hybrid and Web App template to use the new static web assets support in .NET 9 #25478

Open danroth27 opened 4 days ago

danroth27 commented 4 days ago

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

  1. Create a .NET MAUI Blazor Hybrid and Web App project
  2. Look at Program.cs in the Blazor Web App project

Expected: Uses MapStaticAssets() and friends Actual: Uses UseStaticFiles()

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

dhalenggg commented 3 days 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.