Migrating Mvc Static Files

Migrates ASP.NET MVC static file serving and virtual path providers to ASP.NET Core conventions. Moves Content/, Scripts/, and App_Data/ folders into wwwroot/, configures UseStaticFiles middleware, and replaces VirtualPathProvider with IFileProvider and EmbeddedFileProvider. Use when upgrading MVC apps that serve CSS from ~/Content/, JS from ~/Scripts/, use VirtualPathProvider, serve embedded resources, or store files in App_Data. Also triggers for "configure static files in Core", "wwwroot migration", "embedded resource serving", or "files outside wwwroot".

Microsoft 2e2d517 9.5 KB Updated 2.7k repo stars

File contents

microsoft/upgrade-agent-plugins/tree/main/plugins/upgrade-agent/upgrade/dotnet/skills/lazy/web/mvc/migrating-mvc-static-files commit 2e2d517a86

Frequently asked questions

npx skillmds@latest add microsoft/migrating-mvc-static-files