Moving from NHibernate to FluentNHibernate: assembly error (related to versions)?

Posted by goober on Stack Overflow See other posts from Stack Overflow or by goober
Published on 2010-05-16T05:15:28Z Indexed on 2010/05/16 5:20 UTC
Read the original article Hit count: 252

Not sure where to start, but I had gotten the most recent version of NHibernate, successfully mapped the most simple of business objects, etc. When trying to move to FluentNHibernate and do the same thing, I got this error message on build:

"System.IO.FileLoadException: Could not load file or assembly 'NHibernate, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference."

Background: I'm new to Hibernate, NHibernate, and FluentNHibernate -- but not to .NET, C#, etc.

Database I have a database table called Category:

(PK) CategoryID (type: int), unique, auto-incrementing UserID (type: uniqueidentifier) -- given the value of the user Guid in ASP.NET database Title (type: varchar(50) -- the title of the category

Components involved:

  • I have a SessionProviderClass which creates the mapping to the database
  • I have a Category class which has all the virtual methods for FluentNHibernate to override
  • I have a CategoryMap : ClassMap class, which does the fluent mappings for the entity
  • I have a CategoryRepository class that contains the method to add & save the category
  • I have the TestCatAdd.aspx file which uses the CategoryRepository class.

Would be happy to post code for any of those, but I'm not sure that it's necessary, as I think the issue is that somewhere there's a version conflict between what FluentNHibernate references and the NHibernate I have installed from before.

Thanks in advance for any help you can give!

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about fluent-nhibernate