0

我今天从头开始重建我的应用程序,并使用 NuGet 将微风安装到我的应用程序中,但由于依赖项而失败。对于接下来的几个版本,我被迫使用框架 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'.
4

2 回答 2

0

Breeze 应该可以在 .NET 4 上正常工作。要确认这一点,只需创建一个针对 .NET 4 的新 ASP.NET MVC4 Web Api 项目,然后添加任何一个微风 nuget 包。两者都应该安装和工作没有问题。

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

希望这可以帮助。

于 2013-03-19T17:29:35.400 回答
0

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

      <依赖程序集>
        <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089"culture="neutral" />
       <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
      </dependentAssembly>
于 2013-03-20T18:50:18.397 回答