c# 8.0 - ASP.NET Core MVC: wwwroot folder not recognized or not working - Stack Overflow

When I create a new ASP.NET Core MVC project, the wwwroot folder initially appears correctly, like this

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744237046a4564519.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信