SQLite Error IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found.

Date Published: 26 February 2010

SQLite Error IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found.

I just ran into a problem with SQLite and NHibernate, which was giving me this error message:

The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found.

The strange thing was, it worked fine from within Visual Studio, but it died when I used my ClickToBuild.bat file, which calls msbuild and runs my tests from the command line. A bit of searching led me to a similar problem on StackOverflow, which produced the answer:

Use the x64 binaries.

I downloaded the latest version of SQLite (SQLite-1.0.65.0-binaries.zip)and made sure to use the .dll in the x64 folder, and the problem disappeared. Itโ€™s worth noting that Iโ€™m running on Windows 7 x64. Iโ€™m assuming that since Visual Studio 2008 is still in the dark ages and only runs as a 32-bit application, thatโ€™s the reason why this issue only appeared outside of Visual Studio.

Steve Smith

About Ardalis

Software Engineer

Steve is an experienced software architect and trainer, focusing currently on ASP.NET Core and Domain-Driven Design.


Ardalis

Copyright ยฉ 2020