You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/migration/80-90.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,15 +72,15 @@ In the project file, update each [`Microsoft.AspNetCore.*`](https://www.nuget.or
72
72
73
73
## Replace UseStaticFiles with MapStaticAssets
74
74
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.
76
76
77
-
### Blazor
77
+
### Blazor web apps
78
78
79
79
* 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*`).
81
81
* Update the root `App.razor` component to include the `<ImportMap />` component in the head.
82
82
83
-
### Razor Pages and ASP.NET Core MVC
83
+
### Razor Pages and ASP.NET Core MVC based apps
84
84
85
85
* Replace [UseStaticFiles](/dotnet/api/microsoft.aspnetcore.builder.staticfileextensions.usestaticfiles) with [MapStaticAssets](/dotnet/api/microsoft.aspnetcore.builder.staticassetsendpointroutebuilderextensions.mapstaticassets) in `Program.cs`
86
86
* 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