如何安装Breeze nuget包?

时间:2013-04-10 13:12:57

标签: breeze

我在安装Breeze时遇到了一些依赖性问题。

我将ASP.NET和Web Tools 2012.2更新安装到Visual Studio 2012中,然后将Angular安装到一个新制作的ASP.NET Web API项目中,当我尝试安装Breeze nuget包时,它会因此错误而爆炸。< / p>

  

安装失败。回滚...安装包:无法添加   引用'System.Web.Http.OData'。在行:1字符:16   + Install-Package&lt;&lt;&lt;&lt; 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

1 个答案:

答案 0 :(得分:0)

我没有问题 - 我刚刚在Windows 8 x64机器上使用NuGet将Angular(稳定)和Breeze(稳定)安装到TestMVC项目中。安装之前会显示一个接受提示(与OData相关)并且它确实使用PowerShell进行安装 - 因此您应该检查以确保已安装。

------- Installing...Breeze.WebApi 1.2.8 -------
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'.
Added file 'System.Web.Http.OData.dll' to folder 'Microsoft.AspNet.WebApi.OData.4.0.1\lib\net40'.
Added file 'System.Web.Http.Odata.xml' to folder 'Microsoft.AspNet.WebApi.OData.4.0.1\lib\net40'.
Added file 'Microsoft.AspNet.WebApi.OData.4.0.1.nuspec' to folder             'Microsoft.AspNet.WebApi.OData.4.0.1'.
Added file 'Microsoft.AspNet.WebApi.OData.4.0.1.nupkg' to folder 'Microsoft.AspNet.WebApi.OData.4.0.1'.
Successfully installed 'Microsoft.AspNet.WebApi.OData 4.0.1'.
Added file 'WebActivator.dll' to folder 'WebActivator.1.5.3\lib\net40'.
Added file 'WebActivator.1.5.3.nuspec' to folder 'WebActivator.1.5.3'.
Added file 'WebActivator.1.5.3.nupkg' to folder 'WebActivator.1.5.3'.
Successfully installed 'WebActivator 1.5.3'.
Added file 'q.js' to folder 'Q.0.9.2\content\Scripts'.
Added file 'q.min.js' to folder 'Q.0.9.2\content\Scripts'.
Added file 'NuGet.exe' to folder 'Q.0.9.2'.
Added file 'Q.0.9.2.nuspec' to folder 'Q.0.9.2'.
Added file 'Q.0.9.2.nupkg' to folder 'Q.0.9.2'.
Successfully installed 'Q 0.9.2'.
Added file 'BreezeWebApiConfig.cs.pp' to folder 'Breeze.WebApi.1.2.8\content\App_Start'.
Added file 'breeze.debug.js' to folder 'Breeze.WebApi.1.2.8\content\Scripts'.
Added file 'breeze.intellisense.js' to folder 'Breeze.WebApi.1.2.8\content\Scripts'.
Added file 'breeze.min.js' to folder 'Breeze.WebApi.1.2.8\content\Scripts'.
Added file 'Breeze.WebApi.dll' to folder 'Breeze.WebApi.1.2.8\lib'.
Added file 'Irony.dll' to folder 'Breeze.WebApi.1.2.8\lib'.
Added file 'readme.txt' to folder 'Breeze.WebApi.1.2.8'.
Added file 'install.ps1' to folder 'Breeze.WebApi.1.2.8\tools'.
Added file 'Breeze.WebApi.1.2.8.nuspec' to folder 'Breeze.WebApi.1.2.8'.
Added file 'Breeze.WebApi.1.2.8.nupkg' to folder 'Breeze.WebApi.1.2.8'.
Successfully installed 'Breeze.WebApi 1.2.8'.
Removed reference 'System.Web.Http.OData.dll' from project 'MvcApplication1'
Added file 'packages.config'.
Successfully removed 'Microsoft.AspNet.WebApi.OData 4.0.0' from MvcApplication1.
Added reference 'System.Web.Http.OData' to project 'MvcApplication1'
Added file 'packages.config'.
Successfully added 'Microsoft.AspNet.WebApi.OData 4.0.1' to MvcApplication1.
Added reference 'WebActivator' to project 'MvcApplication1'
Added file 'packages.config'.
Successfully added 'WebActivator 1.5.3' to MvcApplication1.
Added file 'q.min.js' to folder 'Scripts'.
Added file 'Scripts\q.min.js' to project 'MvcApplication1'
Added file 'q.js' to folder 'Scripts'.
Added file 'Scripts\q.js' to project 'MvcApplication1'
Added file 'packages.config'.
Successfully added 'Q 0.9.2' to MvcApplication1.
Added file 'breeze.min.js' to folder 'Scripts'.
Added file 'Scripts\breeze.min.js' to project 'MvcApplication1'
Added file 'breeze.intellisense.js' to folder 'Scripts'.
Added file 'Scripts\breeze.intellisense.js' to project 'MvcApplication1'
Added file 'breeze.debug.js' to folder 'Scripts'.
Added file 'Scripts\breeze.debug.js' to project 'MvcApplication1'
Added file 'BreezeWebApiConfig.cs' to folder 'App_Start'.
Added file 'App_Start\BreezeWebApiConfig.cs' to project 'MvcApplication1'
Added reference 'Breeze.WebApi' to project 'MvcApplication1'
Added reference 'Irony' to project 'MvcApplication1'
Added file 'packages.config'.
Successfully added 'Breeze.WebApi 1.2.8' to MvcApplication1.
Executing script file 'C:\Users\andrew\Documents\Visual Studio     2012\Projects\packages\Breeze.WebApi.1.2.8\tools\install.ps1'.
Removed file 'System.Web.Http.OData.dll' to folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0\lib\net40'.
Removed file 'System.Web.Http.Odata.xml' to folder 'C:\Users\andrew\Documents\Visual Studio     2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0\lib\net40'.
Removed folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0\lib\net40'.
Removed folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0\lib'.
Removed file 'Microsoft.AspNet.WebApi.OData.4.0.0.nuspec' to folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0'.
Removed file 'Microsoft.AspNet.WebApi.OData.4.0.0.nupkg' to folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0'.
Removed folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0'.
Successfully uninstalled 'Microsoft.AspNet.WebApi.OData 4.0.0'.
==============================