NHibernate Version Issue

0

I'm having a go at getting a test project up and running. I've nabbed a load of code from this article.....

Fluent NHibernate Automap with NHibernate Facility in ASP.NET MVC

Problem is that I'm getting the following error....

Could not load file or assembly 'NHibernate, Version=3.0.0.1001,
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)

I've downloaded all the latest and greatest from NHibernate, Castle Project, and FluentNHibernate. I've looked at the version of the NHibernate.dll that I am referencing in the project and it's 3.0.0.400. Where and why is the solution complaining about 3.0.0.1001??????

For future use, I'd like to know how I find out what the problem is as well as the solution if possible.

Many thanks,

ETFairfax

MORE INFO.......

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'NHibernate, Version=3.0.0.1001, 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)

Source Error:

Line 45:             if (container == null)
Line 46:             {
Line 47:                 container = new WindsorContainer()
Line 48:                    .Install(
Line 49:                        Configuration.FromAppConfig(),

Source File: C:\Users\Public\Documents\TestCompany\Source\TestCompany.TestModule\MvcApplication2\Global.asax.cs    Line: 47 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'NHibernate, Version=3.0.0.1001, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' could not be loaded.


=== Pre-bind state information ===
LOG: User = ETFairfax-TestCompany\ETFairfax
LOG: DisplayName = NHibernate, Version=3.0.0.1001, Culture=neutral, PublicKeyToken=aa95f207798dfdb4
 (Fully-specified)
LOG: Appbase = file:///C:/Users/Public/Documents/TestCompany/Source/TestCompany.TestModule/MvcApplication2/
LOG: Initial PrivatePath = C:\Users\Public\Documents\TestCompany\Source\TestCompany.TestModule\MvcApplication2\bin
Calling assembly : ClassLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\Public\Documents\TestCompany\Source\TestCompany.TestModule\MvcApplication2\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: NHibernate, Version=3.0.0.1001, Culture=neutral, PublicKeyToken=aa95f207798dfdb4
LOG: Attempting download of new URL file:///C:/Users/ETFairfax/AppData/Local/Temp/Temporary ASP.NET Files/root/25bf06cc/f1f41498/NHibernate.DLL.
LOG: Attempting download of new URL file:///C:/Users/ETFairfax/AppData/Local/Temp/Temporary ASP.NET Files/root/25bf06cc/f1f41498/NHibernate/NHibernate.DLL.
LOG: Attempting download of new URL file:///C:/Users/Public/Documents/TestCompany/Source/TestCompany.TestModule/MvcApplication2/bin/NHibernate.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Revision Number
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Stack Trace:

[FileLoadException: Could not load file or assembly 'NHibernate, Version=3.0.0.1001, 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)]
   System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +64
   System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +58
   System.Type.GetType(String typeName) +50
   Castle.Facilities.NHibernateIntegration.NHibernateFacility.RegisterDefaultConfigurationBuilder() +133
   Castle.Facilities.NHibernateIntegration.NHibernateFacility.RegisterComponents() +29
   Castle.Facilities.NHibernateIntegration.NHibernateFacility.Init() +196
   Castle.MicroKernel.Facilities.AbstractFacility.Init(IKernel kernel, IConfiguration facilityConfig) +61
   Castle.MicroKernel.DefaultKernel.AddFacility(String key, IFacility facility) +182
   Castle.Windsor.WindsorContainer.AddFacility(String key, IFacility facility) +49
   Castle.Windsor.Installer.DefaultComponentInstaller.SetUpFacilities(IConfiguration[] configurations, IWindsorContainer container) +242
   Castle.Windsor.Installer.DefaultComponentInstaller.SetUp(IWindsorContainer container, IConfigurationStore store) +89
   Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers) +268
   MvcApplication2.MvcApplication.InitializeWindsor() in C:\Users\Public\Documents\TestCompany\Source\TestCompany.TestModule\MvcApplication2\Global.asax.cs:47
   MvcApplication2.MvcApplication.Application_Start() in C:\Users\Public\Documents\TestCompany\Source\TestCompany.TestModule\MvcApplication2\Global.asax.cs:62

Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955
nhibernate
fluent-nhibernate
castle-windsor
asked on Stack Overflow Dec 9, 2010 by ETFairfax • edited Dec 22, 2019 by Milo

1 Answer

1

Fluent was probably built with a later version than the NHibernate asselbly you downloaded.

Theres a bundle of Fluent/NH3.0 at Fluent NHibernate website.

http://fluentnhibernate.org/downloads

answered on Stack Overflow Dec 9, 2010 by Phill

User contributions licensed under CC BY-SA 3.0