SQLite NHibernate configuration with .Net 4.0 and vs 2010

前端 未结 3 2083
别那么骄傲
别那么骄傲 2020-12-19 15:31

I am updating this post with what I think I now know about getting this configuration; HOWEVER, there is more to know as I am still having a problem is one crucial area.

3条回答
  •  攒了一身酷
    2020-12-19 16:01

    I had the same problem, and found little or no help on all the forum and blog posts.

    Note that this problem is specific to a case respecting all of the following criteria: - using SQLite - with System.Data.SqlLite - on an x64 machine - and NHibernate (2.1.2.4 in my case)

    That chunk of config in my web.config (or app.config for my unit tests) got it to work. I had to qualify the assembly to be sure he loads correctly.

    
      
        
          
        
      
    
    

    Somewhere in it's inner plumbing, during the mapping using scanned assemblies, NHibernate creates an Assembly object using it's paritla name, as a string, "System.Data.SQLite". Somehow, the x86 version of the assembly got loaded.

    The above configuration made sure that using the partial name to load an assembly would provide the x64 version.

    EDIT: I use version 1.0.66.0 and took the DLL under the bin\x64 folder in the file SQLite-1.0.66.0-binaries.zip available on sourceforge here.

提交回复
热议问题