ASP.NET 5 MVC6 Error: project is not a web project
ASP.NET 5 MVC6 Error: project is not a web project
我从私有 git 存储库克隆了一个现有的 ASP.NET 5 MVC 6 项目。当我 运行 项目时,我收到以下错误:
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.
wwwroot 文件夹也未正确显示,显示为普通文件夹。
已安装 Visual Studio 2015 - 更新 1
安装 asp.net rc1 更新 1
为了详细说明已接受的答案(因为我 运行 遇到了同样的问题),您想从 [= 下载 ASP.NET 5 RC(又名 ASP.NET Core 1.0) 10=], 不是 ASP.NET 4.6.
希望事情已经解决了。
您也可以只创建一个新项目(文件 => 新项目):
- Select 模板
- Visual C#
- 网络
- ASP.NET Web 应用程序 => 好的
- 在Select模板视图上,dobbelt点击:获取ASP.NET5 RC
您现在将下载安装文件:AspNet5.ENU.RC1_Update1_KB3137909
我遇到了同样的问题。
对我来说,将此行添加到 project.json 文件的顶部解决了这个问题。
"webroot": "wwwroot",
"version": "1.0.0-*",
在我的例子中,我必须为 VS 2015 安装 DotNetCore.1.0.1-VS2015Tools.Preview2.0.3
https://go.microsoft.com/fwlink/?LinkID=827546
我正在维护的一个旧项目使用 Core 1.0.1。 - HTH
我从私有 git 存储库克隆了一个现有的 ASP.NET 5 MVC 6 项目。当我 运行 项目时,我收到以下错误:
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.
wwwroot 文件夹也未正确显示,显示为普通文件夹。
已安装 Visual Studio 2015 - 更新 1
为了详细说明已接受的答案(因为我 运行 遇到了同样的问题),您想从 [= 下载 ASP.NET 5 RC(又名 ASP.NET Core 1.0) 10=], 不是 ASP.NET 4.6.
希望事情已经解决了。
您也可以只创建一个新项目(文件 => 新项目):
- Select 模板
- Visual C#
- 网络
- ASP.NET Web 应用程序 => 好的
- 在Select模板视图上,dobbelt点击:获取ASP.NET5 RC
您现在将下载安装文件:AspNet5.ENU.RC1_Update1_KB3137909
我遇到了同样的问题。
对我来说,将此行添加到 project.json 文件的顶部解决了这个问题。
"webroot": "wwwroot",
"version": "1.0.0-*",
在我的例子中,我必须为 VS 2015 安装 DotNetCore.1.0.1-VS2015Tools.Preview2.0.3
https://go.microsoft.com/fwlink/?LinkID=827546
我正在维护的一个旧项目使用 Core 1.0.1。 - HTH