asp.net core 2.2中的wwwroot文件夹 [英] wwwroot folder in asp.net core 2.2

查看:152
本文介绍了asp.net core 2.2中的wwwroot文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚创建了一个新的ASP.NET Core Web应用程序,并选择了一个空的项目模板.我正在使用Visual Studio Community 15.7.1.

I have just created a new ASP.NET Core web application and selected an empty project template. I am using Visual Studio Community 15.7.1.

在第一次查看解决方案资源管理器时,我看不到那里的"wwwroot"文件夹.有谁碰巧知道如果使用asp.net core 2.2,wwwroot不再可见?

Upon a first look at the solution explorer I can see no "wwwroot" folder there. Does anyone happen to know if with asp.net core 2.2 the wwwroot is not visible any longer?

我检查了文档,但找不到任何东西.创建另一个文件夹并从那里提供我的静态文件没有问题,但是我很好奇.

I checked the documentation and I could not find anything. No issues in creating another folder and serve my static files from there but I was just curious.

谢谢.

推荐答案

尝试将新文件夹添加到项目中并将其命名为wwwroot.它的外观应带有适当的图标,并可以按预期工作.当我使用空项目模板时,.NET Core Web应用程序总是会发生这种情况.这是在VS 2017 v15.9.3.

Try adding a new folder to the project and call it wwwroot. It should take on the appearance with the proper icon and work as expected. This always happens to me with .NET Core web apps when I use the empty project template. This is occurring in VS 2017 v15.9.3.

这篇关于asp.net core 2.2中的wwwroot文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆