是否在某个地方有OData依赖图? [英] Is there an OData dependency graph somewhere?

查看:110
本文介绍了是否在某个地方有OData依赖图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注

I'm following this guide to migrate an app I developed to an open framework. I get to the part where I'm supposed to install all the OData references. Specifically these:

Install-Package Angularjs 
Install-Package Microsoft.OData.Client 
Install-Package Microsoft.OData.Core 
Install-Package Microsoft.OData.Edm 
Install-Package Microsoft.Spatial 
Install-Package Microsoft.AspNet.OData 
Install-Package Microsoft.AspNet.WebApi.WebHost

这些是我得到的错误:

Unable to resolve dependencies. 'Microsoft.OData.Core 7.0.0' is not compatible with 'Microsoft.OData.Client 6.15.0 constraint: Microsoft.OData.Core (= 6.15.0)'.
Unable to find a version of 'Microsoft.OData.Core' that is compatible with 'Microsoft.OData.Client 6.15.0 constraint: Microsoft.OData.Core (= 6.15.0)'.
Unable to find a version of 'Microsoft.OData.Core' that is compatible with 'Microsoft.OData.Client 6.15.0 constraint: Microsoft.OData.Core (= 6.15.0)'.
Unable to find a version of 'Microsoft.OData.Edm' that is compatible with 'Microsoft.OData.Core 6.15.0 constraint: Microsoft.OData.Edm (= 6.15.0)'.

我开始一遍又一遍地运行我的应用程序,直到它引发异常,然后将bingindRedirect添加到我的Web.config中以定位当前安装的版本.但这似乎不正确,以后会增加很多维护.我知道如何安装旧版本和夜间版本.但是我不知道要安装哪个版本.有什么地方可以告诉我哪些版本可以正常工作?

I started running my app over and over until it throws an exception and then adding a bingindRedirect to my Web.config to target the currently installed versions. But this doesn't seem right and will add a lot of maintenance later on. I know how to install old versions and nightly versions. But I have no idea which versions to install. Is there some place that tells me which versions work together correctly?

根据NuGet,我已经安装了每个版本6.15.0.那我为什么会出错?

According to NuGet, I have version 6.15.0 of each installed. So why am I getting errors?

推荐答案

运行"Install-Package Microsoft.OData.Client"命令后已经安装了Microsoft.OData.Core,Microsoft.OData.Edm和Microsoft.Spatial,因为它们都是依赖项.您可以从项目参考中进行检查.因此,您不再需要这些命令:

Microsoft.OData.Core, Microsoft.OData.Edm and Microsoft.Spatial were already installed after you run "Install-Package Microsoft.OData.Client" command since they are all the dependencies. You can check it from your project reference. So you don't need these commands anymore:

Install-Package Microsoft.OData.Core 
Install-Package Microsoft.OData.Edm 
Install-Package Microsoft.Spatial 

由于Microsoft.OData.Client的最新版本是6.15.0,因此需要Microsoft.OData.Core和6.15.0版本.所有这些软件包都安装了6.15.0版.

And since the latest version of Microsoft.OData.Client is 6.15.0 which required Microsoft.OData.Core with version 6.15.0. All these packages are installed with version 6.15.0.

如果运行以下命令:

Install-Package Microsoft.OData.Core -Version 6.15.0
Install-Package Microsoft.OData.Edm -Version 6.15.0
Install-Package Microsoft.Spatial -Version 6.15.0

您将收到如下消息:

项目中已经存在软件包'Microsoft.OData.Core.6.15.0'

Package 'Microsoft.OData.Core.6.15.0' already exists in project

另一个问题是,Microsoft.AspNet.OData的最新6.0.0版本要求Microsoft.OData.Core版本> = 7.0.0,而您已安装的版本是6.15.0.因此,您需要安装需要Microsoft.OData.Core> 6.14.0的5.9.1版本.

Another issue is that the latest 6.0.0 version of Microsoft.AspNet.OData requires Microsoft.OData.Core version >= 7.0.0 while the version you already installed is 6.15.0. So you need to install the 5.9.1 version which requires Microsoft.OData.Core > 6.14.0.

Install-Package Microsoft.AspNet.OData -Version 5.9.1

这篇关于是否在某个地方有OData依赖图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆