Breeze.Server.WebApi2 Nuget包与MVC 5.1.1冲突?

Breeze.Server.WebApi2 Nuget包与MVC 5.1.1冲突?,breeze,Breeze,在将MVC软件包更新到当前的Nuget版本(5.1.1)后,我正在尝试安装Breeze.Server.WebApi2 Nuget软件包,并出现以下错误(如下所示)。我是否需要将MVC版本降级为(5.0.0)以使当前的Breeze WebAPI2包正常工作 PM> Install-Package Breeze.Server.WebApi2 Attempting to resolve dependency 'Microsoft.AspNet.WebApi.OData (≥ 5.0 &&

在将MVC软件包更新到当前的Nuget版本(5.1.1)后,我正在尝试安装Breeze.Server.WebApi2 Nuget软件包,并出现以下错误(如下所示)。我是否需要将MVC版本降级为(5.0.0)以使当前的Breeze WebAPI2包正常工作

PM> Install-Package Breeze.Server.WebApi2
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.OData (≥ 5.0 && < 6.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.AspNet.WebApi.Core (≥ 5.0.0 && < 5.1)'.
Attempting to resolve dependency 'Microsoft.Data.OData (≥ 5.6.0)'.
Attempting to resolve dependency 'System.Spatial (= 5.6.0)'.
Attempting to resolve dependency 'Microsoft.Data.Edm (= 5.6.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.WebHost (≥ 5.0 && < 6.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (≥ 5.1.1 && < 5.2.0)'.
Attempting to resolve dependency 'Breeze.Server.ContextProvider (= 1.4.8)'.
Attempting to resolve dependency 'WebActivator'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
Installing 'Microsoft.AspNet.WebApi.OData 5.1.1'.
You are downloading Microsoft.AspNet.WebApi.OData from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.WebApi.OData 5.1.1'.
Installing 'Breeze.Server.ContextProvider 1.4.8'.
Successfully installed 'Breeze.Server.ContextProvider 1.4.8'.
Installing 'WebActivator 1.5.3'.
Successfully installed 'WebActivator 1.5.3'.
Installing 'Breeze.Server.WebApi2 1.4.8'.
Successfully installed 'Breeze.Server.WebApi2 1.4.8'.
Install failed. Rolling back...
Install-Package : Updating 'Microsoft.AspNet.WebApi.Core 5.1.1' to 'Microsoft.AspNet.WebApi.Core 5.0.0' failed. Unable to find a version of 'Microsoft.AspNet.WebApi.WebHost' that is 
compatible with 'Microsoft.AspNet.WebApi.Core 5.0.0'.At line:1 char:1
+ Install-Package Breeze.Server.WebApi2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
PM>安装程序包Breeze.Server.WebApi2
正在尝试解析依赖项“Microsoft.AspNet.WebApi.OData”(≥ 5.0 && < 6.0)'.
正在尝试解析依赖项“Microsoft.AspNet.WebApi.Client”(≥ 5.0.0)'.
正在尝试解析依赖项“Newtonsoft.Json”(≥ 4.5.11)'.
正在尝试解析依赖项“Microsoft.AspNet.WebApi.Core”(≥ 5.0.0 && < 5.1)'.
正在尝试解析依赖项“Microsoft.Data.OData”(≥ 5.6.0)'.
正在尝试解析依赖项“System.Spatial(=5.6.0)”。
正在尝试解析依赖项“Microsoft.Data.Edm(=5.6.0)”。
正在尝试解析依赖项“Microsoft.AspNet.WebApi.WebHost”(≥ 5.0 && < 6.0)'.
正在尝试解析依赖项“Microsoft.AspNet.WebApi.Core”(≥ 5.1.1 && < 5.2.0)'.
正在尝试解析依赖项“Breeze.Server.ContextProvider(=1.4.8)”。
正在尝试解析依赖项“WebActivator”。
正在尝试解析依赖项“Microsoft.Web.Infrastructure”(≥ 1.0.0.0)'.
正在安装“Microsoft.AspNet.WebApi.OData 5.1.1”。
您正在从Microsoft下载Microsoft.AspNet.WebApi.OData,有关许可协议,请访问http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm. 检查软件包中是否有其他依赖项,这些依赖项可能随他们自己的许可协议一起提供。您对软件包和依赖项的使用构成您对其许可协议的接受。如果您不接受许可协议,请从设备中删除相关组件。
已成功安装“Microsoft.AspNet.WebApi.OData 5.1.1”。
正在安装“Breeze.Server.ContextProvider 1.4.8”。
已成功安装“Breeze.Server.ContextProvider 1.4.8”。
安装“WebActivator 1.5.3”。
已成功安装“WebActivator 1.5.3”。
安装'Breeze.Server.WebApi2 1.4.8'。
已成功安装“Breeze.Server.WebApi2 1.4.8”。
安装失败。正在回滚。。。
安装程序包:将“Microsoft.AspNet.WebApi.Core 5.1.1”更新为“Microsoft.AspNet.WebApi.Core 5.0.0”失败。找不到版本为的Microsoft.AspNet.WebApi.WebHost
与“Microsoft.AspNet.WebApi.Core 5.0.0”兼容。第1行字符:1
+安装程序包Breeze.Server.WebApi2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CategoryInfo:NotSpecified:(:)[Install Package],InvalidOperationException
+FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

我在使用此命令修复时遇到了相同的问题

安装程序包Breeze.WebApi2.EF6-DependencyVersion最高

这允许我使用可用的最高依赖版本

请注意,此参数在版本高于2.7.2的nuget package manager中可用

参见链接

这救了我的命