使用NuGet,当升级到最新版本的ASP.net 5.0.0时,我得到以下NuGet响应:
Attempting to resolve dependency 'Microsoft.AspNet.WebPages (= 3.0.0)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (= 1.0.0.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.Razor (= 3.0.0)'.
Installing 'Microsoft.AspNet.Mvc 5.0.0'.
Successfully installed 'Microsoft.AspNet.Mvc 5.0.0'.
Updating 'Microsoft.AspNet.Mvc' from version '4.0.30506.0' to '5.0.0' in project 'HotridesMvc'.
Install failed. Rolling back...
Updating 'Microsoft.AspNet.Mvc 4.0.30506.0' to 'Microsoft.AspNet.Mvc 5.0.0' failed. Unable to find a version of 'AspNetMvc' that is compatible with 'Microsoft.AspNet.Mvc 5.0.0'.
有没有人见过这个?我对旧的包装配置进行了嗅探,并没有看到任何明显的错误。
还有许多其他与aspnet相关的更新,即网页,但我现在留下了一个破碎的网络应用程序,显示死亡的黄色屏幕抱怨dll问题。
答案 0 :(得分:4)
这里的关键是从命令行而不是从UI更新nuget。 Nuget团队意识到了Nicholas发布的问题并且正在调查它。
答案 1 :(得分:3)
我通过卸载现有的mvc NuGet包并重新安装,然后进行解决方案清理构建,然后重建来解决这个问题。
答案 2 :(得分:3)
根据NuGet开发人员danliu的说法“我们正在努力解决这个问题,它将与NuGet 2.8一起发布。”
根据Danliu的说法:此问题的一个解决方法是转到更新选项卡,首先单击“更新”按钮到Microsoft.Net.Http包。完成后,单击UpdateAll按钮。
我无法确认这是否有效。
答案 3 :(得分:0)
这里提出了一个问题:https://nuget.codeplex.com/workitem/3651,虽然我仍在努力解决问题,但没有你那么幸运,只需卸载MVC软件包,清理项目,然后重新安装,修复问题。
使用全新的ASP.NET MVC 4项目('TestASP'),然后立即选择nuget中的全部更新(尝试更新为MVC 5和Web Api 2),这里是完整的nuget日志,错误在底部:
Attempting to resolve dependency 'Microsoft.AspNet.WebPages (≥ 3.0.0)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.Razor (≥ 3.0.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.Mvc (≥ 5.0.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebPages (≥ 3.0.0)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.Razor (≥ 3.0.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.WebHost (≥ 5.0.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (≥ 5.0.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 5.0.0)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.5.11)'.
Attempting to resolve dependency 'Microsoft.Bcl (≥ 1.1.3)'.
Attempting to resolve dependency 'Microsoft.Bcl.Build (≥ 1.0.4)'.
Installing 'Microsoft.AspNet.Razor 3.0.0'.
Successfully installed 'Microsoft.AspNet.Razor 3.0.0'.
Installing 'Microsoft.AspNet.WebPages 3.0.0'.
Successfully installed 'Microsoft.AspNet.WebPages 3.0.0'.
Installing 'Microsoft.AspNet.Mvc 5.0.0'.
Successfully installed 'Microsoft.AspNet.Mvc 5.0.0'.
'Microsoft.AspNet.Razor 3.0.0' already installed.
'Microsoft.AspNet.WebPages 3.0.0' already installed.
'Microsoft.AspNet.Mvc 5.0.0' already installed.
Installing 'Microsoft.AspNet.Mvc.FixedDisplayModes 5.0.0'.
Successfully installed 'Microsoft.AspNet.Mvc.FixedDisplayModes 5.0.0'.
Installing 'Microsoft.AspNet.WebApi.Client 5.0.0'.
Successfully installed 'Microsoft.AspNet.WebApi.Client 5.0.0'.
Installing 'Microsoft.AspNet.WebApi.Core 5.0.0'.
Successfully installed 'Microsoft.AspNet.WebApi.Core 5.0.0'.
Installing 'Microsoft.AspNet.WebApi.WebHost 5.0.0'.
Successfully installed 'Microsoft.AspNet.WebApi.WebHost 5.0.0'.
Installing 'Microsoft.AspNet.WebApi 5.0.0'.
Successfully installed 'Microsoft.AspNet.WebApi 5.0.0'.
Installing 'Microsoft.Bcl.Build 1.0.10'.
Successfully installed 'Microsoft.Bcl.Build 1.0.10'.
Installing 'Microsoft.Bcl 1.1.3'.
Successfully installed 'Microsoft.Bcl 1.1.3'.
Installing 'Microsoft.Net.Http 2.2.15'.
Successfully installed 'Microsoft.Net.Http 2.2.15'.
Installing 'Newtonsoft.Json 5.0.8'.
Successfully installed 'Newtonsoft.Json 5.0.8'.
Updating 'Microsoft.AspNet.Mvc' from version '4.0.30506.0' to '5.0.0' in project 'TestASP'.
Removing 'Microsoft.AspNet.Mvc.FixedDisplayModes 1.0.0' from TestASP.
Successfully removed 'Microsoft.AspNet.Mvc.FixedDisplayModes 1.0.0' from TestASP.
Removing 'Microsoft.AspNet.Mvc 4.0.30506.0' from TestASP.
Successfully removed 'Microsoft.AspNet.Mvc 4.0.30506.0' from TestASP.
Removing 'Microsoft.AspNet.WebPages 2.0.30506.0' from TestASP.
Successfully removed 'Microsoft.AspNet.WebPages 2.0.30506.0' from TestASP.
Removing 'Microsoft.AspNet.Razor 2.0.30506.0' from TestASP.
Successfully removed 'Microsoft.AspNet.Razor 2.0.30506.0' from TestASP.
Adding 'Microsoft.AspNet.Mvc.FixedDisplayModes 5.0.0' to TestASP.
Successfully added 'Microsoft.AspNet.Mvc.FixedDisplayModes 5.0.0' to TestASP.
Adding 'Microsoft.AspNet.Razor 3.0.0' to TestASP.
Successfully added 'Microsoft.AspNet.Razor 3.0.0' to TestASP.
Adding 'Microsoft.AspNet.WebPages 3.0.0' to TestASP.
Successfully added 'Microsoft.AspNet.WebPages 3.0.0' to TestASP.
Adding 'Microsoft.AspNet.Mvc 5.0.0' to TestASP.
Successfully added 'Microsoft.AspNet.Mvc 5.0.0' to TestASP.
Uninstalling 'Microsoft.AspNet.Mvc.FixedDisplayModes 1.0.0'.
Successfully uninstalled 'Microsoft.AspNet.Mvc.FixedDisplayModes 1.0.0'.
Uninstalling 'Microsoft.AspNet.Mvc 4.0.30506.0'.
Successfully uninstalled 'Microsoft.AspNet.Mvc 4.0.30506.0'.
Uninstalling 'Microsoft.AspNet.WebPages 2.0.30506.0'.
Successfully uninstalled 'Microsoft.AspNet.WebPages 2.0.30506.0'.
Uninstalling 'Microsoft.AspNet.Razor 2.0.30506.0'.
Successfully uninstalled 'Microsoft.AspNet.Razor 2.0.30506.0'.
No updates available for 'Microsoft.AspNet.Mvc.FixedDisplayModes' in project 'TestASP'.
No updates available for 'Microsoft.AspNet.Razor' in project 'TestASP'.
Updating 'Microsoft.AspNet.WebApi' from version '4.0.30506.0' to '5.0.0' in project 'TestASP'.
Removing 'Microsoft.AspNet.WebApi 4.0.30506.0' from TestASP.
Successfully removed 'Microsoft.AspNet.WebApi 4.0.30506.0' from TestASP.
Removing 'Microsoft.AspNet.WebApi.WebHost 4.0.30506.0' from TestASP.
Successfully removed 'Microsoft.AspNet.WebApi.WebHost 4.0.30506.0' from TestASP.
Removing 'Microsoft.AspNet.WebApi.Core 4.0.30506.0' from TestASP.
Successfully removed 'Microsoft.AspNet.WebApi.Core 4.0.30506.0' from TestASP.
Removing 'Microsoft.AspNet.WebApi.Client 4.0.30506.0' from TestASP.
Successfully removed 'Microsoft.AspNet.WebApi.Client 4.0.30506.0' from TestASP.
Removing 'Microsoft.Net.Http 2.0.20710.0' from TestASP.
Successfully removed 'Microsoft.Net.Http 2.0.20710.0' from TestASP.
Adding 'Microsoft.AspNet.WebApi.Client 5.0.0' to TestASP.
Successfully added 'Microsoft.AspNet.WebApi.Client 5.0.0' to TestASP.
Adding 'Microsoft.AspNet.WebApi.Core 5.0.0' to TestASP.
Successfully added 'Microsoft.AspNet.WebApi.Core 5.0.0' to TestASP.
Adding 'Microsoft.AspNet.WebApi.WebHost 5.0.0' to TestASP.
Successfully added 'Microsoft.AspNet.WebApi.WebHost 5.0.0' to TestASP.
Adding 'Microsoft.AspNet.WebApi 5.0.0' to TestASP.
Successfully added 'Microsoft.AspNet.WebApi 5.0.0' to TestASP.
Uninstalling 'Microsoft.AspNet.WebApi 4.0.30506.0'.
Successfully uninstalled 'Microsoft.AspNet.WebApi 4.0.30506.0'.
Uninstalling 'Microsoft.AspNet.WebApi.WebHost 4.0.30506.0'.
Successfully uninstalled 'Microsoft.AspNet.WebApi.WebHost 4.0.30506.0'.
Uninstalling 'Microsoft.AspNet.WebApi.Core 4.0.30506.0'.
Successfully uninstalled 'Microsoft.AspNet.WebApi.Core 4.0.30506.0'.
Uninstalling 'Microsoft.AspNet.WebApi.Client 4.0.30506.0'.
Successfully uninstalled 'Microsoft.AspNet.WebApi.Client 4.0.30506.0'.
Uninstalling 'Microsoft.Net.Http 2.0.20710.0'.
Successfully uninstalled 'Microsoft.Net.Http 2.0.20710.0'.
No updates available for 'Microsoft.AspNet.WebApi.Client' in project 'TestASP'.
No updates available for 'Microsoft.AspNet.WebApi.Core' in project 'TestASP'.
No updates available for 'Microsoft.AspNet.WebApi.WebHost' in project 'TestASP'.
No updates available for 'Microsoft.AspNet.WebPages' in project 'TestASP'.
Install failed. Rolling back...
TestASP does not reference 'Microsoft.Net.Http'.
答案 4 :(得分:0)
我所做的就是撤消tfs中的所有更改,以便它从未像我尝试更新那样。然后我将解决方案中所有项目的.net框架更改为.net framework 4.5.1。然后我运行了更新,一切正常。