I am building an application using NHibernate. Since I could not add the DLL from my current version of NHibernate (I cannot add the link when the 4.0 frame is the target).
I tried to get the last and largest part of www, here is what I have now:
- NHibernate.dll (3.2.0.4000)
- NHibernate.ByteCode.Castle (3.0.0.4000)
- FluentNHibernate.dll (1.2.0.694)
- Castle.Core (2.5.2.0)
- Castle.Services.Logging.NLogIntegration (2.5.2.0)
- Antlr.Runtim (3.1.3.42154)
- Iesi.Collections (3.2.0.400)
I can refer and build my decision. I know that there are some problems with copying / loading dll.s, so I made them deployment elements. But the runtime I (still) gets the following:
NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException: Unable to load type "NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" during proxy factory class configuration. Possible reasons: - The NHibernate.Bytecode provider node has not been deployed. - TypeName used to initialize the proxyfactory.factory_class property in the session-factory section is not formed correctly.
Decision:
Verify that your deployment folder contains one of the following assemblies:
NHibernate.ByteCode.LinFu.dll NHibernate.ByteCode.Castle.dll ---> System.TypeLoadException: IsProxy method of type "NHibernate.ByteCode.Castle.ProxyFactoryFactory" from the assembly "NHibernate.ByteCode.Castle, Version = 3.0.0.4000, Culture = neutral, PublicKeyToken = aa95f207798dfdb4 'has no implementation.
Anyone's thoughts?
In response to Vijay Gills's answer, I decided to go the other way.
NUGet packages, department store and easy updates!
There is a FluentNHibernate package. I installed it, but I think something is wrong here too:
The CoreDatabaseTests.CreateCoreDatabase validation method threw an exception:
System.IO.FileLoadException: Failed to load file or assembly "NHibernate, Version = 3.2.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) ---> System.IO.FileLoadException: Failed to load file or assembly "NHibernate, Version = 3.1.0.4000, Culture = neutral, PublicKeyToken = aa95f207798dfdb4" or one of its dependencies. The located assembly manifest definition does not match the assembly reference.