10

使用 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 问题。

4

5 回答 5

4

这里的关键是从命令行而不是从 UI 更新 nuget。Nuget 团队已经意识到 Nicholas 发布的问题并正在调查它。

这是更新步骤的链接:http ://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to -aspnet-mvc-5-and-web-api-2

于 2013-11-08T17:38:42.223 回答
3

根据 NuGet 开发人员 danliu 的说法,“我们正在努力解决这个问题,它将与 NuGet 2.8 一起发布。”

根据 Danliu 的说法:此问题的一种解决方法是转到更新选项卡,首先单击更新按钮到 Microsoft.Net.Http 包。完成后,单击 UpdateAll 按钮。

我一直无法确认这是否有效。

https://nuget.codeplex.com/workitem/3651

于 2013-11-13T02:35:03.813 回答
3

我已经通过卸载现有的 mvc NuGet 包并重新安装,然后进行解决方案清理构建,然后重新构建来解决此问题。

于 2013-10-21T07:55:51.633 回答
0

我所做的只是撤消 tfs 中的所有更改,这样它就不会看起来像我试图更新。然后,我将解决方案中所有项目的 .net 框架更改为 .net 框架 4.5.1。然后我运行更新,一切正常。

于 2014-08-06T23:01:52.143 回答
0

问题在这里提出:https://nuget.codeplex.com/workitem/3651,虽然我仍在尝试解决问题,但没有你那么幸运,简单地卸载 MVC 包,清理项目,然后重新安装,问题解决。

使用全新的 ASP.NET MVC 4 项目('TestASP'),然后立即在 nuget 中选择 Update All(它尝试更新到 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'.
于 2013-11-08T06:07:57.357 回答