vendredi 30 octobre 2015

How can I package a DLL without managed code into my WPF app?

I've been using LibZ Container for awhile now to bundle DLL files together with my executables, resulting in only needing to copy a single executable file instead of installing a bunch of DLLs. (For those not familiar LibZ Container is an alternative to IL Merge, only that it works with WPF.)

Normally this works great, but today I learned that it doesn't work so great with the SQLite library. In particular, there's one file that fails to package. This is the error message that I get:

Loading '.\SQLite.Interop.dll'

Failed to load assembly from '.\SQLite.Interop.dll'

Assembly '.\SQLite.Interop.dll' could not be loaded

Looking on the SQLite FAQ page I see they state this:

Do I need to add an assembly reference to the "sqlite3.dll" or "SQLite.Interop.dll" in my project?

No, because they are not managed assemblies and contain no managed code.

I must confess I'm not really sure what that means... until now this stuff has mostly been a black box to me that just sort of works. Is there any way to bundle the SQLite.Interop.dll file with the assembly like I'm hoping? Can anyone offer an explanation of why LibZ Container is choking on this DLL file in particular?

Aucun commentaire:

Enregistrer un commentaire