System.Data.SQLite
View Ticket
Not logged in
Ticket UUID: 489bfa53fcc10d0fe5bc2472e6f77c1c298ea5c3
Title: Unable to load DLL 'SQLite.Interop.DLL' (test.exe)
Status: Closed Type: Incident
Severity: Critical Priority: Immediate
Subsystem: None Resolution: Not_A_Bug
Last Modified: 2011-10-27 13:14:13
Version Found In: 1.0.76
Description:
Hello,

I am using 1.0.76 version on VS2010. All runs fine, my app compiles and I need to distribute it to the customer.

I am distributing to a test workstation with Windows XP SP2 and almost any software installed. A clean environment.

Aplication structure: C:\app\myApp.exe C:\app\System.Data.SQLite.dll C:\app\System.Interop.dll

We have problems at the start with: Unable to load DLL 'SQLite.Interop.DLL'.

I have tried to COPY+PASTE all SQLite-installation-folder to the testing workstation. Warning: COPY+PASTE... not install SQLite. And I have tried to execute test.exe but the problem is the same:

************** Texto de la excepción **************
System.Reflection.TargetInvocationException: Se produjo una excepción en el destino de la invocación. ---> System.TypeInitializationException: Se produjo una excepción en el inicializador de tipo de 'System.Data.SQLite.SQLiteFactory'. ---> System.DllNotFoundException: No se puede cargar el archivo DLL 'SQLite.Interop.dll': No se puede encontrar el módulo especificado. (Excepción de HRESULT: 0x8007007E)
en System.Data.SQLite.UnsafeNativeMethods.sqlite3_config(Int32 op, SQLiteLogCallback func, IntPtr pvUser) en System.Data.SQLite.SQLite3.SetLogCallback(SQLiteLogCallback func) en c:\dev\sqlite\dotnet\System.Data.SQLite\SQLite3.cs:línea 957
en System.Data.SQLite.SQLiteLog.Initialize() en c:\dev\sqlite\dotnet\System.Data.SQLite\SQLiteLog.cs:línea 163
en System.Data.SQLite.SQLiteFactory..cctor() en c:\dev\sqlite\dotnet\System.Data.SQLite\LINQ\SQLiteFactory_Linq.cs:línea 25
--- Fin del seguimiento de la pila de la excepción interna ---
*******************************************
What can I do to distribute our application and execute it without any problems.

Thanks.


anonymous added on 2011-10-26 16:44:59 UTC:
After copy this file: MSVCR100.dll

To the same application folder.

I have the error:
System.BadImageFormatException: Se ha intentado cargar un programa con un formato incorrecto. (Excepción de HRESULT: 0x8007000B)
en System.Data.SQLite.UnsafeNativeMethods.sqlite3_open_interop(Byte[] utf8Filename, Int32 flags, IntPtr& db)
en System.Data.SQLite.SQLite3.Open(String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool)
en System.Data.SQLite.SQLiteConnection.Open()

I am stuck here..... :-(


mistachkin added on 2011-10-26 17:43:21 UTC:

Please make sure that you are using the SQLite.Interop.dll and MSVC runtime files for the processor architecture that matches your machine.


anonymous added on 2011-10-26 18:22:01 UTC:
Compiling in x64.

Test workstation (VirtualBox x86).

I am going to test it inmediately and come back with results.


anonymous added on 2011-10-26 18:55:50 UTC:
You are right...

I was using msvcr100.dll from the C:\WINDOWS\SYSTEM32 (on x64 development computer). I have checked it with depents.exe and it was a x64 library. :-(

At last I have found, renamed and used 'msvcr100_clr0400.dll' on the runtime workstation and I could run test.exe only with an error.
I have that error in tests (multithreaded test) but It was only a test. Now I am going to download & install this: vcredist_x86.exe and try it again.

Perhaps it is a virtual box stuff. I don't know.


A question: Can I avoid the installation of this library _msvcr100.dll_ on some way ?

Can I get in someway ONLY a library SDS with Interop and msvcr100.dll already included ? This will be great.

Thank you very much..... and congratulations for your work.


mistachkin added on 2011-10-27 13:13:03 UTC:
You can download one of the following statically linked release packages:

Precompiled Statically-Linked Binaries for 64-bit Windows (.NET Framework 4.0), mixed-mode assembly

Precompiled Statically-Linked Binaries for 64-bit Windows (.NET Framework 4.0), separate native and managed assemblies