【发布时间】:2014-04-30 18:37:13
【问题描述】:
所以我有一个包 NServiceBus.Host,它依赖于 NServiceBus >= 4.5.0。
在 nuget 上有一个 4.5.1 版本的 NServiceBus。当我安装包 NServiceBus.Host 我得到:
PM> install-package nservicebus.host
Attempting to resolve dependency 'NServiceBus (≥ 4.5.0)'.
Attempting to resolve dependency 'NServiceBus.Interfaces (≥ 4.5.0)'.
Installing 'NServiceBus.Interfaces 4.5.0'.
You are downloading NServiceBus.Interfaces from NServiceBus Ltd, the license agreement to which is available at http://particular.net/LicenseAgreement. 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 'NServiceBus.Interfaces 4.5.0'.
Installing 'NServiceBus 4.5.0'.
如你所见,我得到了 4.5.0 版本的依赖项。
在nuget doco 中声明:
如果没有安装依赖,NuGet会经过以下 步骤:
NuGet 会枚举订阅源中的每个版本的 Subkismet 在版本规范中。 NuGet 然后将该设置范围缩小为 具有最低主要/次要版本的软件包。剩下的 包,NuGet 会选择版本号最高的包。
“NuGet 选择版本号最高的那个。”这里似乎违反了,因为有一个 never 版本。
这是 NuGet 中的错误吗?
【问题讨论】:
-
如果您在倒数第二段重新引用文档的一部分时,您错过了一点:“在其余包中,NuGet 选择版本号最高的包” - 可能是 NuGet 存储库中更高的版本号,但这不是您的包或其依赖项引用的最高版本号。
-
但在这种情况下,4.5.0 和 4.5.1 都应该包含在剩余的软件包中,对吧?