NuGet包版本冲突

时间:2016-08-26 18:58:53

标签: xamarin.forms version nuget-package

我来问一个问题,也许是愚蠢的,但我找不到合适的解释..

对于此示例,我将以 Xamarin Forms - Portable Project 为例,查看 Project.Droid部分。另外,我要采取以下方案:

如您所见, Xamarin.Forms.Map 包是版本2.3.1.114 其他包,23.3.0 。但是,有一个更新,但是当我创建它时, 23.3.0 版本的软件包更新到23.4.0.1 ,而 Xamarin.Forms.Map 正在降级为 1.5.1.6471 ......

为什么它会像它一样工作?为什么一切都没有到最后一次更新?此更新/降级有哪些不同的影响?还有,最好的选择是什么?更新 Xamarin.Android.Support.xxx 软件包并降级 Xamarin.Forms.Map 一个或者反过来会更好吗?

提前感谢您的回答/解释:)

2 个答案:

答案 0 :(得分:2)

某些软件包是更新的,并且与上一版本的Xamarin.form不兼容,因为更新的主要原因并不是同一频率,所有新版本的Xamarin.form都需要进行探测,并且保持稳定,可能存在一个与另一个之间的延迟。

例如,如果您尝试安装Xamarin.Android.Support.Design

Attempting to resolve dependencies for package 'Xamarin.Android.Support.Design.23.4.0.1' with DependencyBehavior 'Lowest'
One or more unresolved package dependency constraints detected in the existing packages.config file. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'Xamarin.Android.Support.Design 23.3.0'

无法解析依赖项。 'Xamarin.Android.Support.Design 23.4.0.1'与'Xamarin.Forms 2.3.1.114约束:Xamarin.Android.Support.Design(= 23.3.0)'不兼容。

'Xamarin.Android.Support.Design 23.4.0.1'与'Xamarin.Forms 2.3.1.114 约束:Xamarin.Android.Support.Design(= 23.3.0)'不兼容。

Xamarin表格2.3.1.114说我与版本= 23.3.0兼容

问候。

答案 1 :(得分:0)

nuget管理器允许您将软件包更新为与项目属性中选择的目标SDK版本兼容的版本。如果您需要升级到更新版本,您必须安装更新版本的android SDK并在项目属性中更新它以便能够升级nuget包。