开发者

FluentNHibernate RTM and NHibernate.Linq

开发者 https://www.devze.com 2022-12-08 12:38 出处:网络
I\'ve had a system up and running that used the Fluent NHibernate pre-release v0.0.1.0 along with NHibernate 2.1.0.4000 and NHibernate.Linq 1.0.0.0.

I've had a system up and running that used the Fluent NHibernate pre-release v0.0.1.0 along with NHibernate 2.1.0.4000 and NHibernate.Linq 1.0.0.0.

I've just put in the new Fluent NHibernate RTM dlls and fixed my code for the breaking changes but I'm getting a couple of issues dependant on how I try to implement.

1) If I don't change the NHibernate dll to the one that is supplied with the FluentNHibernate then I get开发者_运维知识库 an error message complaining that Fluent NHibernate targets a different version of NHibernate even though both have the same version number.

The exception message is as follows: 'Assembly 'FluentNHibernate, Version=1.0.0.593, Culture=neutral, PublicKeyToken=8aa435e3cb308880' uses 'NHibernate, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' which has a higher version than referenced assembly 'NHibernate, Version=2.0.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4'

2) If I change the NHibernate dll to the one that is supplied with the FluentNHibernate RTM then my program breaks when trying to resolve the assemblies in the class that uses NHibernate.Linq. It also complains about found conflicts between dependant versions of the same assembly.

If NHibernate.Linq 1.0.0.0 can't be used with Fluent NHibernate then that's fine and I'll find a way around it but I'm interested if anyone has found a way for them to play nicely together and why there are apparently two divergent versions of NHibernate with the same version number.

Thanks,


Your version numbers aren't the same according to that exception.

... 'FluentNHibernate' uses 'NHibernate, Version=2.1.0.4000 ... which has a higher version than referenced assembly 'NHibernate, Version=2.0.1.4000 ...

2.1.0.4000 vs. 2.0.1.4000


You may try to use assembly binding redirection for this as described here.

Here is the sample that could work for you (haven't tried though)

0

精彩评论

暂无评论...
验证码 换一张
取 消