in

System.Data.SQLite

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

Unable to load DLL 'SQLite.Interop.DLL'

Last post 03-24-2009 9:20 PM by Nullstring. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-24-2009 8:50 PM

    • Nullstring
    • Not Ranked
    • Joined on 03-25-2009
    • Baguio City, Philippines
    • Posts 3

    Unable to load DLL 'SQLite.Interop.DLL'

    I am so newbie on SQLite3 ADO.NET. So I was expecting I don't have to install anything to make this thing work.

    My problem is this:

    I just got the "SQLite-1.0.60.0-source" downloaded and rebuilt the "SQLite.Interop", "System.Data. SQLite - Full", and "test" projects. It went fine :) but when I start a new instance of "test" and click "Run" button. I got this exception thrown:

    Message:
    Unable to load DLL 'SQLite.Interop.DLL': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

    Source: SQLite3.cs @ Line 112
    #if !SQLITE_STANDARD
    int n = UnsafeNativeMethods.sqlite3_open_interop(ToUTF8(strFilename), (int)flags, out db); // ------ this line is where the error's pointing at.
    #else
    int n = UnsafeNativeMethods.sqlite3_open_v2(ToUTF8(strFilename), out db, (int)flags, IntPtr.Zero);
    #endif

    So I checked the "System.Data. SQLite - Full" project properties and on the Build tab I saw "USE_INTEROP_DLL" on "Conditional compilation symbolds"

    ..? so ... ok ...

    I checked the "SQLite.Interop" project property page .. and I got "The operation could not be completed. Unspecified error" message

    .. *sigh* ..

    I checked the "bin" contents and I saw 5 files: System.Data.SQLite.dll, System.Data.SQLite.pdb, test.exe, test.exe.config, test.pdb
    and I don't see the "SQLite.Interop.DLL" ? Where on earth is that file?

    On the readme.htm it saids ...
    "
    Distributing The SQLite Engine and ADO.NET Assembly

    On the desktop, only the System.Data.SQLite.DLL file needs to be distributed with your application(s). This DLL contains both the managed wrapper and the native SQLite3 codebase. For the Compact Framework, you will have to distribute both the CF version of System.Data.SQLite.DLL, as well as the SQLite.Interop.XXX.DLL. This is a breaking change as of 1.0.59.0. Recent Windows Mobile frameworks are not supporting the mixed CF assembly I was building prior to this version.
    "

    Noting ..
    "On the desktop, only the System.Data.SQLite.DLL file needs to be distributed with your application(s). This DLL contains both the managed wrapper and the native SQLite3 codebase."

    Any idea what's wrong? Am I doing anything wrong?
  • 03-24-2009 9:20 PM In reply to

    • Nullstring
    • Not Ranked
    • Joined on 03-25-2009
    • Baguio City, Philippines
    • Posts 3

    Re: Unable to load DLL 'SQLite.Interop.DLL'

    Robert Simpson saids The only time you'll ever see any reference to SQLite.Interop.DLL is if you downloaded the provider source code and compiled it yourself in Debug mode.

    In Release mode, the SQLite.Interop.DLL doesn't exist. The interop dll and the managed wrapper are combined into a single assembly. It sounds to me like you've distributed the debug build of System.Data.SQLite which contains only the managed wrapper portion of the project. You can tell for sure by examining the size of the DLL. If System.Data.SQLite.DLL is around 120kb, then its a debug build.

    You are always best off using my pre-compiled binary. The x86 and x64 builds are compiled using Profile Guided Optimizations and will always run faster than a regular release build.

    Robert


    How do you properly build the Source then?
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems