Can FluentNHibernate be used with .Net4?

Posted by stiank81 on Stack Overflow See other posts from Stack Overflow or by stiank81
Published on 2010-04-23T10:28:42Z Indexed on 2010/04/27 8:13 UTC
Read the original article Hit count: 381

I have a WPF application running with .Net3.5 using FluentNHibernate, and all works fine. When I upgraded to VS2010 I ran into some odd problems, but after changing to use x64 variant of SQLite it worked fine again.

Now I want to change to use .Net4, but this has turned into a more painful experience then I expected.. First I met a problem which required that I set a [SecurityCritical] attribute. Fine - I fixed this. But the reason this was exposed was because an exception was thrown in the first place. And the exception thrown was the following - when calling FluentConfiguration.BuildConfiguration:

FluentConfigurationException unhandled

An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail

The inner exception gives us more information:

Message = "Could not create the driver from NHibernate.Driver.SQLite20Driver, NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4."

This is what I saw in my own project when moving to VS2010. I have tried changing Fluent to use the x64 variant of SQLite, but this doesn't change anything. Does it sound like it might be related to mixing of 32bit and 64bit assemblies?

I see that there are also others that have seen this problem, but I haven't really seen any solution yet.

Anyone out there using Fluent with .Net4 and SQLite - on a 64bit machine - successfully? Help! I'm lost...

© Stack Overflow or respective owner

Related posts about .NET

Related posts about .net-4.0