Skip to content

Commit 89732a9

Browse files
Update 80-90.md
1 parent f4eb109 commit 89732a9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

aspnetcore/migration/80-90.md

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

7373
## Replace `UseStaticFiles` with `MapStaticAssets`
7474

75+
Warning: It's recommended not to remove ```app.UseStaticFiles();``` but add ```app.MapStaticAssets();``` after it. Because it will cause an error if you load static files without the Assets feature.
76+
7577
Optimize the handling of static files in your web apps by replacing <xref:Microsoft.AspNetCore.Builder.StaticFileExtensions.UseStaticFiles%2A> with <xref:Microsoft.AspNetCore.Builder.StaticAssetsEndpointRouteBuilderExtensions.MapStaticAssets%2A> in the app's `Program` file:
7678

7779
```diff

0 commit comments

Comments
 (0)