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

跟風遠走 提交于 2019-12-30 06:53:07

问题


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

There is:

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 available as binary download http://www.sqlite.org/download.html

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

The first option installs to C:/...Program Files. Can I copy it from there to my custom SharedLibs folder, or will something reference the files originally installed?


回答1:


You only need System.Data.SQLite.dll. You could reference this assembly in your SharedLibs folder and it should be enough. The sqlite3.dll is unmanaged code containing the databae engine itself and it is embedded as 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 reference the correct one for your system.

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



来源:https://stackoverflow.com/questions/4898006/sqlite-sqlite3-dll-vs-system-data-sqlite-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!