I just got bitten by this yesterday, when I installed my project on a
Windows 7 machine for the first time.

A Google search revealed that setting Build Target (on the project's
Build tab) to "x86" fixes the problem.  It creates an .exe that will
run on both 32 bit and 64 bit versions of Windows, using the 32 bit
SQLite driver.

-Tom Bushell

On Jan 6, 1:14 am, Craig Gardiner <[email protected]> wrote:
> Hi James,
>
> I fixed my problem!
>
> If you are interested in how and why, read on..
>
> I didn't include the error on purpose, which was stupid so here it is..
>
>   ----> FluentNHibernate.Cfg.FluentConfigurationException : An invalid or
> incomplete configuration was used while creating a SessionFactory. Check
> PotentialReasons collection, and InnerException for more detail.
>
>   ----> NHibernate.HibernateException : Could not create the driver from
> NHibernate.Driver.SQLite20Driver, NHibernate, Version=3.0.0.4000,
> Culture=neutral, PublicKeyToken=aa95f207798dfdb4.
>
>   ----> System.Reflection.TargetInvocationException : Exception has been
> thrown by the target of an invocation.
>
> So I asked myself, why can't NHibernate create the driver?
>
> What driver.. Huh??? An ADO.NET driver "System.Data.SQLite"
>
> Where should this driver live (given that our CI build server is 32bit and
> my dev box is 64bit)? I think in the GAC.
>
> Is it a good idea to copy System.Data.SQLite.dll to your local project Lib
> directory and include this dependency within your VCS (ie. checkin SQLite)?
> No.
>
> So when you introduce SQLite into your project you are introducing a logical
> dependency to the SQLite ADO.Net driver where the final physical dll
> dependency is OS dependant.
>
> Or should I have stopped investigating and gone with "just re-install SQLite
> and that will fix it". I have heard many a dev say "just re-install and that
> will fix it" and when you ask them why - "it just does.."
>
> Cheers,
>
> Craig Gardiner.
>
> From: [email protected]
> [mailto:[email protected]] On Behalf Of James Gregory
> Sent: Wednesday, 5 January 2011 9:16 PM
> To: [email protected]
> Subject: [fluent-nhib] Re: Examples.FirstProject is not working for me
>
> What's the error?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Fluent NHibernate" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/fluent-nhibernate?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to