VS2015 ASP.NET 5 beta7依赖关系无法解决 [英] VS2015 ASP.NET 5 beta7 dependency could not be resolved
问题描述
这是此问题的后续措施.我从VS2015社区中的Empty ASP.NET项目开始,试图根据一个教程添加几个软件包,但尚未使其真正起作用.链接问题中的最初问题是由于某些使用 beta5
的项目依赖性和某些使用 beta7
的项目依赖性.匹配那些解决了这个问题,但是现在当我尝试在IIS Express中运行项目时出现此错误:
This is a follow-up to this question. I started with an Empty ASP.NET project in VS2015 community, tried to add a couple packages based on a tutorial, and haven't gotten it to actually work yet. The initial problem in the linked question was due to some project dependencies using beta5
and some using beta7
. Matching those up solved that, but now I get this error when I try to run the project in IIS Express:
Could not load file or assembly 'Microsoft.Dnx.Host.Clr' or one of its dependencies.
我认为问题仍然与版本有关,就像以前的 web.config
程序集参考问题一样,但我还不知道如何处理.我尝试根据在GitHub上发现的类似问题修改 global.json
,但现在无法构建.我猜似乎找不到较新版本的CLR.从VS2015中的错误列表中:
I think the problem is still version related--like the previous web.config
assembly reference issues--but I don't know how to deal with it yet. I tried modifying global.json
based on a similar issue I found on GitHub, but now it doesn't build. It looks like it can't find the newer version of the CLR I guess. From the Error List in VS2015:
The dependency Microsoft.AspNet.Mvc >= 6.0.0-beta7 could not be resolved.
The dependency Microsoft.AspNet.Server.IIS >= 1.0.0-beta7 could not be resolved.
The dependency Microsoft.AspNet.Server.WebListener >= 1.0.0-beta7 could not be resolved.
global.json
:
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-beta7",
"runtime": "clr",
"architecture": "x86"
}
}
我的项目的引用"树中有黄色的错误指示符,但在我的项目的NuGet软件包管理器中查看并没有显示任何升级(据我所知,根本没有安装任何升级).
My project's References tree has yellow error indicators but looking in the NuGet package manager for my project doesn't show any upgrades (or anything installed at all, as far as I can tell).
dnvm列表
:
1.0.0-beta5 clr x64
1.0.0-beta5 clr x86
1.0.0-beta5 coreclr x64
1.0.0-beta5 coreclr x86
* 1.0.0-beta7 clr x86 default
1.0.0-beta8-15585 clr x86
dnu列表
:
Microsoft .NET Development Utility CLR-x86-1.0.0-beta7-15532
我已经重新启动VS,但这没有帮助.回到我的 global.json
中的 beta5
使其成功编译,但随后出现IIS错误.
I've restart VS but that didn't help. Changing back to beta5
in my global.json
makes it compule successfully but then I get the IIS error.
project.json
:
{
"webroot": "public",
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNet.Mvc": "6.0.0-beta7",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta7",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta7"
},
"commands": {
"web": "Microsoft.AspNet.Hosting --config hosting.ini"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"publishExclude": [
"node_modules",
"bower_components",
"**.xproj",
"**.user",
"**.vspscc"
],
"exclude": [
"public",
"node_modules",
"bower_components"
]
}
package.json
:
{
"version": "1.0.0",
"name": "ASP.NET",
"private": true,
"devDependencies": {
"angular2": "2.0.0-alpha.36",
"gulp": "3.9.0"
}
}
推荐答案
要将ASP.NET 5 beta7与Visual Studio 2015一起使用,您将需要下载并安装ASP.NET的beta7版本(14.0.60831.0),并Web Tools 2015."
"To use ASP.NET 5 beta7 with Visual Studio 2015, you will need to download and install the beta7 version (14.0.60831.0) of ASP.NET and Web Tools 2015."
http://go.microsoft.com/fwlink/?LinkId=623894
https://github.com/aspnet/Home/releases
这篇关于VS2015 ASP.NET 5 beta7依赖关系无法解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!