我已经在一个项目(3.3.1 版)中安装了 nhibernate,现在我正在尝试通过 Nuget 包管理器下载 fluentNhibernate,但出现此错误:
PM> install-package fluentnhibernate -Version 1.3.0.733
Attempting to resolve dependency 'NHibernate (≥ 3.3.1.4000)'.
Attempting to resolve dependency 'Iesi.Collections (≥ 3.2 && < 4.0)'.
Successfully installed 'Iesi.Collections 3.2.0.4000'.
Successfully installed 'NHibernate 3.3.2.4000'.
Successfully installed 'FluentNHibernate 1.3.0.733'.
Install failed. Rolling back...
install-package : Updating 'NHibernate 3.1.0.4000' to 'NHibernate 3.3.2.4000' failed.
Unable to find a version of 'NHibernate.Castle' that is compatible with 'NHibernate
3.3.2.4000'.
At line:1 char:1
+ install-package fluentnhibernate -Version 1.3.0.733
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
我不明白为什么这不会成功,因为它说 nhibernate 只需要版本 3.3.1 或更高版本,那么为什么它试图强制升级到 3.3.2(我想保持在 3.3.1)哪个然后与城堡不兼容。
对此是否有任何解释,或者是否有任何解决方法可以安装 fluentnhibernate 但将 nhibernate 保持在当前版本(它说没问题)?
任何建议,将不胜感激。