[英]Nuget dependencies between prerelease packages
The scenario is package management with NuGet.该方案是使用 NuGet 进行包管理。
Suppose you have PackageA that depends on PackageB, you publish both of them so whenever you publish PackageA, you specify the version range of Package B you depends on.假设您有依赖于 PackageB 的 PackageA,您发布它们两个,因此无论何时发布 PackageA,您都指定依赖的 Package B 的版本范围。
Now both of the packages are automatically published with a Build, and they use SemVer (GitVersion.exe), version 6.0.0 of PackageA declares that it needs at least version 6.0.0 of Package B. This works perfectly if packages are in stable version.现在这两个包都用 Build 自动发布,并且它们使用 SemVer (GitVersion.exe),PackageA 的 6.0.0 版声明它至少需要 Package B 的 6.0.0 版。如果包处于稳定状态,这完美地工作版本。
Actually no 6.xx stable version exists for both package and if I'm installing the prerelease version of PackageA it complains because it needs at least version 6.0.0 of packageB, but packageB has only 6.0.0-prerelease version.实际上,这两个包都不存在 6.xx 稳定版本,如果我正在安装 PackageA 的预发布版本,它会抱怨,因为它至少需要 packageB 的 6.0.0 版本,但 packageB 只有 6.0.0-prerelease 版本。
Here is the error.这是错误。
Unable to resolve dependencies. 'PackageB 6.0.0-unstable0066' is not compatible with 'PackageA 6.0.0-unstable0015 constraint: PackageB (>= 6.0.0)'.
My question is, how is the correct way to manage dependencies from pre-release version of packages?我的问题是,从包的预发布版本管理依赖项的正确方法是什么?
Thanks.谢谢。
For me, this is a clear bug at NuGet, because even if you explicitly add a reference to PackageB 6.0.0-unstablewhatever, NuGet claims that the packages are incomatible.对我来说,这是 NuGet 的一个明显错误,因为即使您明确添加对 PackageB 6.0.0-unstablewhatever 的引用,NuGet 也声称这些包是不兼容的。
Or, to be more precise, it does that if you are using package references.或者,更准确地说,如果您使用包引用,它会这样做。 If you use the old package.config format, NuGet is happy to accept the prerelease package.如果您使用旧的 package.config 格式,NuGet 很乐意接受预发布包。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.