Skip to content

Commit edef634

Browse files
committed
MapStaticAssets to migration /2
1 parent 3c5057d commit edef634

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

aspnetcore/migration/80-90.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ In the project file, update each [`Microsoft.AspNetCore.*`](https://www.nuget.or
7272

7373
## Replace UseStaticFiles with MapStaticAssets
7474

75-
Blazor has different update instructions than Razor Pages and ASP.NET Core MVC.
75+
Blazor has different update instructions for `MapStaticAssets` than Razor Pages and ASP.NET Core MVC.
7676

77-
### Blazor
77+
### Blazor web apps
7878

7979
* Replace [UseStaticFiles](/dotnet/api/microsoft.aspnetcore.builder.staticfileextensions.usestaticfiles) with [MapStaticAssets](/dotnet/api/microsoft.aspnetcore.builder.staticassetsendpointroutebuilderextensions.mapstaticassets) in `Program.cs`
80-
* Update explicit references to static assets in .razor files to use the `@Assets["asset-path"]` API. This should ***NOT*** be done for the Blazor framework scripts (`*blazor.\*.js*`)
80+
* Update explicit references to static assets in `.razor` files to use the `@Assets["asset-path"]` API. This should ***NOT*** be done for the Blazor framework scripts (`*blazor.\*.js*`).
8181
* Update the root `App.razor` component to include the `<ImportMap />` component in the head.
8282

83-
### Razor Pages and ASP.NET Core MVC
83+
### Razor Pages and ASP.NET Core MVC based apps
8484

8585
* Replace [UseStaticFiles](/dotnet/api/microsoft.aspnetcore.builder.staticfileextensions.usestaticfiles) with [MapStaticAssets](/dotnet/api/microsoft.aspnetcore.builder.staticassetsendpointroutebuilderextensions.mapstaticassets) in `Program.cs`
8686
* Chain a call to `.WithStaticAssets` after `MapRazorPages` or `MapControllerRoute` in `Program.cs`. For an example, see the <xref:fundamentals/static-files?view=aspnetcore-9.0&preserve-view=true>

0 commit comments

Comments
 (0)