【问题标题】:Breeze.Server.WebApi2 Nuget Package Conflict with MVC 5.1.1?Breeze.Server.WebApi2 Nuget 包与 MVC 5.1.1 冲突?
【发布时间】:2014-03-04 00:46:23
【问题描述】:

我正在尝试安装 Breeze.Server.WebApi2 Nuget 包,在将我的 MVC 包更新到当前的 Nuget 版本 (5.1.1) 之后,我收到以下错误(如下)。我是否需要将 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

【问题讨论】:

    标签: breeze


    【解决方案1】:

    我在使用这个命令时遇到了同样的问题

    Install-Package Breeze.WebApi2.EF6 -DependencyVersion Highest

    这让我可以使用可用的最高依赖版本。

    请注意此参数在 nuget 包管理器中可用,版本高于 2.7.2

    查看链接 http://docs.nuget.org/docs/reference/package-manager-console-powershell-reference

    【讨论】:

    • 这只是救了我的命
    猜你喜欢
    • 2018-07-20
    • 1970-01-01
    • 1970-01-01
    • 2022-06-13
    • 1970-01-01
    • 2013-07-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多