When I create a new ASP.NET Core MVC project, the wwwroot folder initially appears correctly, like this:when the project is created
However, when I close Visual Studio and reopen the project, the wwwroot folder looks different, and I start getting errors related to missing static files:When do I reopen the project
Issue wwwroot is not recognized properly after reopening the project.
Visual Studio does not display the special "globe" icon for wwwroot.
Static files (CSS, JS, images) are not being served correctly.
I see this warning in the console when running the project:
warn: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[16]
The WebRootPath was not found: C:\Users\myuser\source\repos\MyProject\bin\Debug\net8.0\wwwroot. Static files may be unavailable.