SQLite NHibernate configuration with .Net 4.0 and vs 2010

Posted by Berryl on Stack Overflow See other posts from Stack Overflow or by Berryl
Published on 2010-04-15T21:45:11Z Indexed on 2010/04/16 0:43 UTC
Read the original article Hit count: 716

I am having way too much trouble getting my environment straight after switching to 2010 and .net 4.0, so I'd like to break the whole process down once and for all.

1) Which SQLite dll?? I think it is SQLite-1.0.65.1-vs2010rc-net4-setup.zip. Yes?

2) I ran the installer so the dll is in the GAC but I usually find there are less problems if I can just reference the dll stand alone. Is there any reason it needs to be in the GAC, and if not, what's the best way to uninstall it from the GAC (I can get to the GAC folder but it says I need permission to delete the files; should I leave the SQLite Designer dll's there?)?

3) x64. There is an x64 dll in the download. I had problems with SQLite in the past though that I could only resolve by compiling to x86. Can I safely reference the x64 dll and compile to Any CPU now?

4) what is the right NHib config? I have been using the one below, but since the error I get says "Could not create the driver from NHibernate.Driver.SQLite20Driver." that configuration is guilty until proven innocent too?

5) could FNH be a problem too? I don't use the pre-configured fluent SQLite method but FNH has to provide a reference to it for that to work, no?

TIA & Cheers,
Berryl

<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
...
    <property name="dialect">NHibernate.Dialect.SQLiteDialect</property>
    <property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property>
    <property name="connection.connection_string">Data Source=:memory:;Version=3;New=True;</property>
....
</hibernate-configuration>

© Stack Overflow or respective owner

Related posts about sqlite

Related posts about nhibernate