Use MapStaticAssets()

Proprietary

Replace UseStaticFiles() with MapStaticAssets() for ASP.NET Core 9. Only applies when the receiver supports IEndpointRouteBuilder (WebApplication / minimal hosting). Skips Startup.cs patterns using IApplicationBuilder where MapStaticAssets is not available.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net9.UseMapStaticAssets
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net9.UseMapStaticAssets

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.