我在安装 Breeze 时遇到了一些依赖问题。
我将 ASP.NET 和 Web Tools 2012.2 更新安装到 Visual Studio 2012 中,然后将 Angular 安装到一个新制作的 ASP.NET Web API 项目中,当我尝试安装 Breeze nuget 包时,它会出现此错误。
安装失败。回滚... 安装包:无法添加对“System.Web.Http.OData”的引用。在 line:1 char:16 + Install-Package <<<< Breeze.WebApi + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
这是来自命令行的完整安装尝试,包括它试图解决的所有依赖项。
Install-Package Breeze.WebApi Attempting to resolve dependency 'Microsoft.AspNet.WebApi'. Attempting to resolve dependency 'Microsoft.AspNet.WebApi.WebHost (≥ 4.0.20710.0 && < 4.1)'. Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'. Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (≥ 4.0.20710.0 && < 4.1)'. Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 4.0.20710.0 && < 4.1)'. Attempting to resolve dependency 'Microsoft.Net.Http (≥ 2.0.20710.0 && < 2.1)'. Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.5.6)'. Attempting to resolve dependency 'Microsoft.AspNet.WebApi.OData'. Attempting to resolve dependency 'Microsoft.Data.OData (≥ 5.2.0 && < 6.0.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 'EntityFramework (≥ 4.4 && < 6.0)'. Attempting to resolve dependency 'Q'. You are downloading Microsoft.AspNet.WebApi.OData from Microsoft.... Successfully installed 'Microsoft.AspNet.WebApi.OData 4.0.1'. Successfully installed 'WebActivator 1.5.3'. Successfully installed 'Q 0.9.2'. Successfully installed 'Breeze.WebApi 1.2.8'. Successfully removed 'Microsoft.AspNet.WebApi.OData 4.0.0' from CrashBangZoom.WebApi. Install failed. Rolling back... Install-Package : Failed to add reference to 'System.Web.Http.OData'. At line:1 char:16 + Install-Package <<<< Breeze.WebApi + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand