15

I cloned an existing ASP.NET 5 MVC 6 project from a private git repository. When I run the project I receive the following error:

The selected debug option is IIS Express but this project is not a web project. To use IIS Express you need tho add the wwwroot attribute to project.json. error

The wwwroot folder is also not shown correctly and is displayed as a normal folder.

enter image description here

Installed Visual Studio 2015 - Update 1

4
  • did you also install aspnet 5 rc1 update 1 from get.asp.net ? Commented Dec 31, 2015 at 13:58
  • @herrh VS 2015 update 1 only has beta8. It would be highly recommended to go to get.asp.net and download the newest version. Commented Dec 31, 2015 at 15:09
  • @janpieter_z okay, I will update it. I Think this will solves my problem. Commented Dec 31, 2015 at 15:10
  • You can add this comment as an answer and I will accept it. Commented Dec 31, 2015 at 15:11

5 Answers 5

14

make sure you install asp.net rc1 update 1 from http://get.asp.net

Sign up to request clarification or add additional context in comments.

3 Comments

Did you mean RC1 Update 1? There is no update 12 as of yet. And I have it and still face this issue.
yeah sorry, typo, I didn't notice, fixed
My issue was slightly different. I didn't have a wwwroot (had it renamed to public) and IISExpress was choking on that. Kestrel seems fine with the rename.
7

I had the same problem.

For me, adding this line to the top of the project.json file solved the issue.

"webroot": "wwwroot",
 "version": "1.0.0-*",

1 Comment

This helped me solve a similar issue, just updating project.json with the webroot worked
1

In my case I had to install DotNetCore.1.0.1-VS2015Tools.Preview2.0.3 for VS 2015

https://go.microsoft.com/fwlink/?LinkID=827546

An old project I am maintaining uses Core 1.0.1. - HTH

Comments

0

Just to elaborate on the accepted answer (since I ran into the same problem), you want to download ASP.NET 5 RC (aka ASP.NET Core 1.0) from http://get.asp.net, not ASP.NET 4.6.

Hopefully that clears things up.

Comments

0

You can also just create a new project(File => New project):

  1. Select templates
  2. Visual C#
  3. Web
  4. ASP.NET Web Application => Ok
  5. On the Select a template view, dobbelt click: Get ASP.NET 5 RC

You wil now dowload the install file: AspNet5.ENU.RC1_Update1_KB3137909

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.