2

wwwroot folder is not added to a project after running the dotnet new web. Should I just add it manually?

Here is the project structure that I see:

enter image description here

I am following the tutorial over here, but instead of a VS I am using the VS Code and the .NET Core CLI. Does it mean that the template created with the help of the dotnet new web and with the help of the VS GUI are different?

qqqqqqq
  • 1,831
  • 1
  • 18
  • 48

1 Answers1

1

It seems to be by design that the empty project template with version2.2 and above does not contain wwwroot folder.

You could add a new folder to the project and call it wwwroot. It should take on the appearance with the proper icon and work as expected. Also , you could use dotnet new mvc or dotnet new webapp to create a ASP.NET Core Web App (Model-View-Controller) template which automatically generate wwwroot folder.

Reference :

https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-new?tabs=netcore22

wwwroot folder in asp.net core 2.2

Xueli Chen
  • 11,987
  • 3
  • 25
  • 36