in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Unable to load DLL 'sqlite3': The specified module could not be found.

Last post 12-17-2010 3:26 PM by julienberube. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-23-2009 2:37 PM

    Unable to load DLL 'sqlite3': The specified module could not be found.

    I am getting this error when trying to use the system.data.sqlite dll.  It works fine on my dev box, but on the webserver...no dice.  I tried adding it to the GAC...which I think I did successfully...but I really don't know how to tell.  Any advice? 

    Filed under:
  • 01-23-2009 2:45 PM In reply to

    Re: Unable to load DLL 'sqlite3': The specified module could not be found.

    You must be using the managed-only version of the DLL?  If so you also need to copy over sqlite3.dll from sqlite.org's website.  Or alternatively, use the mixed-mode DLL I also provide which contains both the native and managed library rolled into one.

     

  • 01-23-2009 3:12 PM In reply to

    Re: Unable to load DLL 'sqlite3': The specified module could not be found.

    For those of you who run into this problem, the following steps solved my problem.

    1.  Copy the mixed-mode (not managed only) version of the system.data.sqlite.dll into the framework/v???  folder
    2. Make sure the gacutil is in the same folder
    3. go to command line, navigate to the folder that contains both the gacutil and the system.data.sqlite.dll
    4. run the following command gacutil /i system.data.sqlite.dll
    5. If successful....then it should run fine.

    Side note: Make sure you reference the gac registered location in your project or it won't work.

  • 12-17-2010 3:26 PM In reply to

    Re: Unable to load DLL 'sqlite3': The specified module could not be found.

    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. <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <qualifyAssembly partialName="System.Data.SQLite" fullName="System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=AMD64" /> </assemblyBinding> </runtime> </configuration> 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.
Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems