Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Data.SQlite not showing in change data source of Visual Studio 2013

I am using Visual Studio 2013 and it's up to date. I was in search of using a local database which doesn't require SQL Server to be installed on a client machine. I figured out that SQLite is the one that I should use, so I installed SQLite through NuGet. When I tried to create a data source from Server Explorer, I was expecting to see the System.Data.SQLite which was unfortunately not present.

All of the references and required files are included in my solution. I did all the steps, searched different forums and tried all but nothing worked. I also followed the steps that were present in Stack Overflow for the Visual Studio 2012 but none of them worked. What steps I should follow in order to use SQLite properly?

like image 474
Jamal Hussain Avatar asked May 19 '14 08:05

Jamal Hussain


People also ask

How do I add a data source in Visual Studio 2013?

Open your project in Visual Studio, and then choose Project > Add New Data Source to start the Data Source Configuration Wizard. Choose the type of data source to which you'll be connecting. Choose the database or databases that will be the data source for your dataset.

How do I add SQLite to Visual Studio?

Getting Started with SQLite from a .Open Visual Studio, select new project, and, in Visual C#, select “Console Application” and provide the name as SQLiteDemo. Click OK. To connect SQLite with C#, we need drivers. Install all required SQLite resources from the NuGet package, as pictured in Figure 1.


1 Answers

I had a similar problem where I installed the System.Data.SQLite packages from Nuget, but the 'System.Data.SQLite Database File' option would not be listed as a data source.

In order to fix this problem, I ran through some of the steps from this blog post by Brecht Carlier. I fixed the issue by uninstalling the package, going to the official SQLite downloads page, searching for the 32-bit Windows (.NET Framework 4.5.1) Setup executable, which is the one labeled:

This is the only setup package that is capable of installing the design-time components for Visual Studio 2013.

Then I ran the executable, re-installed the System.Data.SQLite package through NuGet, and rebuilt the project. Everything seemed to work after that.

The problem seems to be that even if you're on a 64-bit machine, you need to download the 32-bit version. Hope this helps.

like image 149
alex Avatar answered Oct 16 '22 08:10

alex