SQLite Forum

Could not load assembly System.Data.SQLite.dll
Login

Could not load assembly System.Data.SQLite.dll

(1) By DMoody007 on 2020-09-24 21:27:38 [link] [source]

I created a small visual basic windows form application using SQLite. I am new to this product but experienced DB programmer.

I managed to install this application on 130 computers without an issue and works fine. On two computers, I get a .net exception. All are windows 10 pro's. Error is:

Could not load a file or assembly "system.data.SQLite.dll" or one of its dependencies. the specified module could not be found.

The DLL is packaged with the application and is present in the install. The error only occurs when loading a page that references data in the database.

I am using the SQLite version 1.0.113.0 and programmed for .net 4.6.2.

I tried to manually install the SQL lite package for 4.6.2, 64bit windows 10. It installs without error but the test app that comes with it fails with a similar error.

I tried a .net repair. Finds no errors.

Not quite sure why only these computers and now stumped on a way to debug further. Computers are in different states so I can not just rebuild. Hoping someone out here had a similar experience and provide some direction on next steps to get this working.

Thanks in advance for any advice.

(2) By Keith Medcalf (kmedcalf) on 2020-09-25 14:11:20 in reply to 1 [link] [source]

Likely you are missing a DLL on those machines that are having problems. You can find out which one using DEPENDS. It is highly likely that it is one of the Microsoft Visual Studio runtime DLLs.

(5) By DMoody007 on 2020-09-25 15:37:31 in reply to 2 [source]

Thank you for that - checking now...

(3) By anonymous on 2020-09-25 14:23:24 in reply to 1 [link] [source]

You will also get an exception when you mix 32-bit and 64 bit. Windows has tools to determine if it's 32-bit or 64-bit code. There are also tools to explore the dependencies to determine if certain DLLs are missing.

(4) By DMoody007 on 2020-09-25 15:37:13 in reply to 3 [link] [source]

Confirmed the problem PC's are 64 bit but good idea. I wasn't exactly sure so worth checking. Still looking into the Dependencies.

(6) By DMoody007 on 2020-09-25 20:32:40 in reply to 1 [link] [source]

Thanks for the assist.

I was running DumpBin and Depends and found a few DLL's that were not registering correctly. They were present but not registered. Dug a little deeper and found several windows updates for .net were failing to install. Dug in a little more and found a corrupt registry database on the offending laptops.

Standard repair wouldn't work. We ran an OS repair. DLL's are now registering correctly. Installed the App and SQLite is working great like all the others.

Thanks again!