views:

347

answers:

2

So I'm converting my mapping files on an as needed basis (when making changes, convert to mapping). Any when configuring NHibernate like so:

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

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

And 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's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)

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

+1  A: 

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

Kyle West
Yep. Run into that myself a few times.
Justice
A: 

Where did you edit this?