m.MIR
m.MIR

Reputation: 21

Don't exist wwwroot in visual 2017 in core 2.1

enter image description hereI have a problem with core 2.1.when I create a project mvc with core 2.1 I don't have wwwroot in my project. would you please help me?

enter image description here

Upvotes: 0

Views: 3102

Answers (2)

Mohamed Beshri Amer
Mohamed Beshri Amer

Reputation: 361

  1. Create a folder and name it wwwroot in the project Folder
  2. Edit *.csproj (the project file)

If there is a section that had folder add your folder

<ItemGroup>
  <Folder Include="Controllers\" />
  <Folder Include="Views\" />
  <Folder Include="wwwroot\" />
</ItemGroup>

If it is not just add

<ItemGroup>
  <Folder Include="wwwroot\" />
</ItemGroup>
  1. reload the project

Upvotes: 2

Mojtaba Nava
Mojtaba Nava

Reputation: 878

This problem seems to occur when the wwwroot folder is empty. Adding files below wwwroot and reloading the project makes the wwwroot folder appear as expected.

enter image description here

Upvotes: 2

Related Questions