【发布时间】:2015-05-15 15:48:53
【问题描述】:
我们正在使用 Visual Studio Code 开发我们的第一个 ASP.NET 5 项目。我们已经安装了 DNVM 和 DNX。我们还从 ASP.NET 的 GitHub 帐户中检查了 NewMVC6Project。此外,我们在 project.json 中配置了我们的 Web 服务器,如下所示。
{
"webroot": "wwwroot",
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
"Microsoft.AspNet.Server.WebListener" : "1.0.0-beta4",
"Microsoft.AspNet.Mvc": "6.0.0-beta4",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"bundleExclude": [
"node_modules",
"bower_components",
"**.kproj",
"**.user",
"**.vspscc"
],
"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001"
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
]
}
此外,当我们运行dnvm list 时,我们会收到此输出。
Active Version Runtime Architecture Location Alias
------ ------- ------- ------------ -------- -----
* 1.0.0-beta4 clr x86 C:\Users\BigFont\.dnx\runtimes default
在 Visual Studio Code 中打开项目文件夹时,我们仍然收到此错误。
> The specified runtime path '1.0.0-beta3' does not exist. Searched locations %USERPROFILE%\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta3
为什么要寻找 1.0.0-beta3 而不是 1.0.0-beta4?我们如何解决这个问题?
【问题讨论】:
标签: asp.net asp.net-core visual-studio-code