尝试安装此软件包时似乎存在依赖性问题。我想弄清楚我搞砸了什么,以及如何调试这个,所以我可以把这一切都搞定。奇怪的是,即使它说它未能添加对System.Web.Http.OData的引用,该引用也会在失败后显示在项目中。
我在VS2012上安装的唯一东西就是这次更新。
http://www.asp.net/vnext/overview/latest
Install-Package Microsoft.AspNet.WebApi.OData
Attempting to resolve dependency 'Microsoft.Net.Http (= 2.0.20710.0 && < 2.1)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (= 4.0.20710.0 && < 4.1)'.
Attempting to resolve dependency 'Newtonsoft.Json (= 4.5.6)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (= 4.0.20710.0 && < 4.1)'.
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)'.
You are downloading Microsoft.AspNet.WebApi.OData from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/aspnet_and_web_tools_2012_2_RTW_EULA_ENU.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.WebApi.OData 4.0.1'.
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 <<<< Microsoft.AspNet.WebApi.OData
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
修改
因此,似乎已经安装了上面的Microsoft.AspNet.WebApi.OData包。所以,我删除了。现在它抱怨在我尝试为Breeze安装软件包时需要上面的库来工作时添加System.Spatial。
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 uninstalled 'System.Spatial 5.2.0'.
Install failed. Rolling back...
Install-Package : Failed to add reference to 'System.Spatial'.
At line:1 char:16
+ Install-Package <<<< Breeze.WebApi
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
答案 0 :(得分:0)
最后不得不卸载并重新安装VS2012以使其停止发生。不确定哪个依赖项搞砸了,但即使删除软件包并重做它们也没有用。