Odd exception when combining .hbm.xml and Fluent NHibernate - any ideas?

So, I convert my mapping files as needed (when creating a change, convert to mapping). Anyone when setting up NHibernate like this:

Assembly asm = Assembly.Load("RPMWare.Core.DataAccess");

//NHibernate configuration: see hibernate.cfg.xml
var cfg = new Configuration();
cfg.AddMappingsFromAssembly(asm);
cfg.Configure();

      

And after running my web application, I get the following exception:

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

      

However, all of my integration tests are working as expected. Any ideas?

+1


source to share


1 answer


Nevermind. If you are using the latest version of Fluent NHibernate and the latest version of NHibernate, you need to add YOUR NHibernate VERSION to the Fluent NHibernate project before building.



+3


source







All Articles