SQLite: sqlite3.dll vs System.Data.SQLite.dll?

What do I need to use SQLite with NHibernate (and FluentNHibernate )?

Exist:

System.Data.SQLite.dll and System.Data.SQLite.Linq.dll , (ADO.NET 2.0 provider), available from http://sourceforge.net/projects/sqlite-dotnet2/

and

sqlite3.dll is available as a binary file http://www.sqlite.org/download.html

What is the difference? Do I need both, or which one?

The first option is installed on C: / ... Program Files. Can I copy it there to my SharedLibs folder or will something refer to files that were originally installed?

+4
source share
1 answer

You only need System.Data.SQLite.dll . You can reference this assembly in your SharedLibs folder, and that should be enough. sqlite3.dll is unmanaged code that contains the databae mechanism itself, and it is embedded in a resource inside the managed System.Data.SQLite assembly. Also, because of this unmanaged code, there are actually two versions of the System.Data.SQLite assembly: one for x86 and one for x64, so make sure you link to the correct one for your system.

You can download this assembly here: http://sqlite.phxsoftware.com/

+10
source

Source: https://habr.com/ru/post/1338423/


All Articles