Visual Studio C# – SQLite.Interop.dll not found

I also encountered the similar issue in my environment of Visual Studio 2017 and NET Framework 4.5, the circumstance is:

I am developing an Outlook Add Ins using ClickOnce to publish it and SQLite as the database. After having installed the SQLite library into the project from NuGet, it works perfectly in the local environment but pops up the exception error message “Unable to load DLL ‘SQLite.Interop.dll'” on the client machine.

I compared the two environments and found the DLL file ‘SQLite.Interop.dll’ had not been published to the client machine that we can see in the following graphic.
enter image description here

I searched ‘SQLite.Interop.dll’ in local environment and found it is saved in the following folder “{project}\packages\System.Data.SQLite.Core.1.0.105.2\build\” for the specific .Net FrameWork
enter image description here

So, my solution is adding these two DLL libraries into the project, then they can be published to the client machine using the ClickOnce.
enter image description here

(Notice: The selected DLL version should be as same as the NET Framework version in your environment.)

Leave a Comment