MaYaN MaYaN - 11 months ago 98
C# Question

Why am I getting DllNotFoundException when adding SQLite Nuget Package to LINQPad?

I have added the

NuGet package to my LINQPad 5 Query (Premium) and then try to execute the following:

new SQLiteConnection(":memory:").Dump();

But I get:

DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': The
specified module could not be found. (Exception from HRESULT:

How can I tell LINQPad where to find the SQLite Native DLLs?

Please note I do not want to use the IQ Driver.

Answer Source

This library is not referenced in the standard way, because it's native and requires different images for X86 and X64.

A workaround in LINQPad is to locate the following folder:


and copy the X86 and X64 subfolders into the folder where LINQPad.exe is located.