我遇到了一些依賴性問題,安裝Breeze。我怎樣才能讓Breeze nuget包安裝?
我將ASP.NET和Web Tools 2012.2更新安裝到Visual Studio 2012中,然後將Angular安裝到新創建的ASP.NET Web API項目中,並且當我嘗試安裝Breeze nuget包時,它會彈出此錯誤消息。
安裝失敗。回滾... Install-Package:未能將 引用添加到「System.Web.Http.OData」。在行:1個字符:16 +安裝-封裝< < < < Breeze.WebApi + CategoryInfo:NotSpecified:(:) [安裝封裝],出現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
嗯,我必須有某種依賴性問題。我不確定我在哪裏搞砸了。這是一臺Windows 7 X64機器。它確實安裝了Powershell。我以管理員身份運行VS2012。您是否安裝了WebTools更新? – Harv 2013-04-10 13:51:27
似乎安裝最新版本的Microsoft.AspNet.WebApi.OData是實際問題,因爲如果我嘗試單獨安裝它,則會失敗。我會關閉它並重新提出這個問題。 – Harv 2013-04-10 13:53:56