版本1.2.4与框架4.0不兼容

时间:2013-03-19 14:53:01

标签: breeze

我今天正在从头开始重建我的应用程序并使用NuGet将breeze安装到我的应用程序中,并且它在依赖项上失败了。对于接下来的两个版本,我被迫使用framework 4.0而不是4.5。是否有解决依赖性问题的工作?

Attempting to resolve dependency 'Microsoft.AspNet.WebApi'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.WebHost (≥ 5.0.0-alpha-130319 && ≤ 5.0.65535.65535)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (≥ 5.0.0-alpha-130319 && ≤ 5.0.65535.65535)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 5.0.0-alpha-130319 && ≤ 5.0.65535.65535)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.OData'.
Attempting to resolve dependency 'Microsoft.Data.OData (≥ 5.2.0 && < 5.3.0)'.
Attempting to resolve dependency 'System.Spatial (= 5.2.0)'.
Attempting to resolve dependency 'Microsoft.Data.Edm (= 5.2.0)'.
Attempting to resolve dependency 'WebActivator'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
Attempting to resolve dependency 'EntityFramework (≥ 4.4 && < 6.0)'.
Attempting to resolve dependency 'Q'.
Successfully installed 'Microsoft.AspNet.WebApi.Client 5.0.0-alpha-130319'.
Successfully installed 'Microsoft.AspNet.WebApi.Core 5.0.0-alpha-130319'.
Successfully installed 'Microsoft.AspNet.WebApi.WebHost 5.0.0-alpha-130319'.
Successfully installed 'Microsoft.AspNet.WebApi 5.0.0-alpha-130319'.
Successfully installed 'System.Spatial 5.2.0'.
Successfully installed 'Microsoft.Data.Edm 5.2.0'.
Successfully installed 'Microsoft.Data.OData 5.2.0'.
Successfully installed 'Microsoft.AspNet.WebApi.OData 5.0.0-alpha-130319'.
Successfully installed 'WebActivator 1.5.3'.
Successfully installed 'Q 0.9.2'.
Successfully installed 'Breeze.WebApi 1.2.4'.
Install failed. Rolling back...
Updating 'Microsoft.AspNet.WebApi.WebHost 4.0.20710.0' to 'Microsoft.AspNet.WebApi.WebHost 5.0.0-alpha-130319' failed. Unable to find a version of 'Microsoft.AspNet.WebApi.HelpPage' that is compatible with 'Microsoft.AspNet.WebApi.WebHost 5.0.0-alpha-130319'.

2 个答案:

答案 0 :(得分:0)

Breeze应该可以正常使用.NET 4.要确认这一点,只需创建一个针对.NET 4的新的ASP.NET MVC4 Web Api项目,并添加其中一个breeze nuget包。要么安装和工作没有问题。

我猜你的项目中有一些旧的nuget包引用。例如,我看到refs为“Microsoft.AspNet.WebApi.WebHost(≥5.0.0-alpha ...”。Breeze本身并不依赖于任何“alpha”nuget包。

希望这有帮助。

答案 1 :(得分:0)

另外...确保您的Web.config具有以下重定向:

      <dependentAssembly>
        <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
       <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
      </dependentAssembly>