【发布时间】:2020-01-24 22:36:35
【问题描述】:
我为 Xamarin 表单创建了一个库,我想将它作为 Nuget 包发布。有几个依赖项,在 nuspec 中我使用了以下符号
<dependencies>
<group targetFramework="netstandard1.1">
<dependency id="NETStandard.Library" version="1.6.1" />
<dependency id="Xamarin.Forms" version="2.5.0.91635" />
<dependency id="Newtonsoft.Json" version="10.0.3" />
</group>
<group targetFramework="MonoAndroid">
<dependency id="Xamarin.GooglePlayServices.Location" version="42.1021.1" />
<dependency id="Xamarin.GooglePlayServices.Places" version="42.1021.1" />
<dependency id="Xamarin.Android.Maps.Utils" version="0.5.0" />
<dependency id="Xamarin.Forms" version="2.5.0.91635" />
<dependency id="Newtonsoft.Json" version="10.0.3" />
</group>
</dependencies>
现在,当我在使用最新 Xamarin Google 库的项目中引用 nuget 包时,出现错误
Detected package version outside of dependency constraint: Xamarin.GooglePlayServices.Location 42.1021.1 requires Xamarin.GooglePlayServices.Basement (= 42.1021.1) but version Xamarin.GooglePlayServices.Basement 71.1620.0 was resolved.
引用 Nuget Docs 我的符号 sais:接受所有大于或等于 42.1021.1 的版本。那么包含 42.1021.1 和 71.1620.0 的正确表示法是什么?
【问题讨论】: