System.Data.Sqlite not being recognized by Visual

2019-03-13 19:41发布

问题:

I have a Windows Server 2008 (64-bit) box that I am doing development on. I've installed Visual Studio 2010 and System.Data.SQLite (from sqlite.phxsoftware.com). My problem is that the former is not seeing the latter. That is, when I go to the Server Explorer in Visual Studio and select "Connect to Database" and the "Choose Data Source" window appears, SQLite does not appear under the list of data sources. Anyone know what the deal is with that? Could it be an issue with Windows Server 2008 because in the past I've no issues with VS 2010 + System.Data.Sqlite on a Windows 7 box.

Update: System.Data.SQLite and System.Data.SQLite.Linq assemblies are showing up in my GAC

回答1:

I'm running into the same issue with VS2010 and the latest version of the SQLite provider from System.Data.SQLite.org. I haven't resolved it yet with that version, but I did find that when I uninstalled it and then installed the previous version (1.0.66.0) from sqlite.phxsoftware.com it worked just fine.



回答2:

EDIT - 2018-06-15: Updated non-working link, and changed answer to reflect improvements over the years with managing project dependencies.


I had the exact same issue...and just ran across this blog that has a workaround:

Original link (considered obsolete by author): http://www.tsjensen.com/blog/post/2011/06/04/SQLite+On+Visual+Studio+2010+Setup+Instructions

New link (still relevant): http://www.tsjensen.com/blog/post/2012/11/10/SQLite-on-Visual-Studio-with-NuGet-and-Easy-Instructions

TL;DR: Use the System.Data.SQLite(x86/x64) Nuget package.



回答3:

I was able to get this to work if I installed the x86 bundle. When you install that one, it will give you an option that does NOT appear in the x64. It will allow you to install the designer tools, where it asks you about putting it in the general cache. It does force the install to the general cache however.

The package that worked for me was: sqlite-netFx40-setup-bundle-x86-2010-1.0.80.0.