Could not load file or assembly NHibernate error

225 views
Skip to first unread message

Catalin

unread,
Mar 12, 2012, 8:26:29 AM3/12/12
to nhu...@googlegroups.com
Hi,

I am trying to switch from NH 3.1GA to NH 3.3CR1, once I have substituted NHibernate.dll file with the new version, I am receiving the following error:

Could not load file or assembly 'NHibernate, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).

The environment I am working in is ASP.net 4.0, with some other libraries build on the top of NHibernate: NHibernate Burrows, FluentNHibernate, NHibernate Search, NHibernate Validator.

Should I recompile these libraries as well, with the NHibernate 3.3.0CR1 ?

I have googled around to find a solution, and I have found various hints (ex: deleting the temporarary internet folders, the bindingRedirect tag in the web.config file), but none of them succeeded to solve my problem.

What is the correct solution to this problem ?

Thank you,
C.

Oskar Berggren

unread,
Mar 12, 2012, 8:40:21 AM3/12/12
to nhu...@googlegroups.com
2012/3/12 Catalin <catalin....@gmail.com>:

> Hi,
>
> I am trying to switch from NH 3.1GA to NH 3.3CR1, once I have substituted
> NHibernate.dll file with the new version, I am receiving the following
> error:
>
> Could not load file or assembly 'NHibernate, Version=3.1.0.4000,
> Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its
> dependencies. The located assembly's manifest definition does not match the
> assembly reference. (Exception from HRESULT: 0x80131040).
>
> The environment I am working in is ASP.net 4.0, with some other libraries
> build on the top of NHibernate: NHibernate Burrows, FluentNHibernate,
> NHibernate Search, NHibernate Validator.
>
> Should I recompile these libraries as well, with the NHibernate 3.3.0CR1 ?

In principle yes, unless those projects themselves make builds
available. That is the unfortunate side effect. The bindingRedirect
should work though, except when actual incompatibilities occur.

/Oskar

Reply all
Reply to author
Forward
0 new messages