最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin5浏览0评论

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.
发布评论

评论列表(0)

  1. 暂无评论