在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它说:
If the dependency is not installed,NuGet goes through the following
steps:NuGet enumerates every version of Subkismet within the feed that’s
within the version specification. NuGet then narrows that set to just
the packages with the lowest Major/Minor version. Of the remaining
packages,NuGet picks the one with the highest version number.
“NuGet选择版本号最高的那个.”似乎在这里违反了,因为从来没有版本.
这是NuGet中的错误吗?
此外,NuGet将 – 默认情况下 – 解析允许范围内的最低major.minor版本,如包依赖项中所定义.所以4.5.0是一个正确的默认依赖解析.
自NuGet v2.8.1以来的新功能:您可以使用NuGet包管理器控制台使用备用依赖项解析算法:
Install-Package NServiceBus.Host -DependencyVersion HighestPatch
还有更多选项,请查看以下文档:
https://docs.nuget.org/docs/reference/package-manager-console-powershell-reference#Install-Package
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。