Click here to Skip to main content
15,886,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I'm new to SQLite, so new that I can't even use it yet due to installation issues:)
My goal is to add an 'ADO.NET Entity Data Model' object to my VB project and use a DBcontext to manipulate my data. I used this tutorial ADO.NET Entity Data Model[^] as a starting point. I posted my question in the page but it seems the author is not monitoring it anymore. Here is what has been done and what is happening:

I'm using VS2012.
I have created a SQLite DB using 'SQLite Administrator'.
I installed in VS the NuGet package indicated in the tutorial.
I installed System.Data.SQLite as indicated (sqlite-netFx45-setup-bundle-x86-2012-1.0.94.0.exe) from the SQLite web site.
I can create a connection in Server Explorer since the SQLite provider shows upin the list.
When trying to add an 'ADO.NET Entity Data Model' to my project I cannot go further since:
1. My existing connection (previously created) doesn't show in the dropdown control
2. When choosing 'New Connection' I do not see the SQLite provider, only MS-SQL.

Am I missing something, an installation, a reference, whatever else? I need the provider to show up in the EDM wizzard, how do I proceed?

Thanks in advance for your help.
Posted

I assume you use EF 6. This article may help you. Also, you may need to install data provider for EF.
 
Share this answer
 
Comments
sfrenchie 20-Feb-15 18:55pm    
Thank you so much for the pointers. The article you linked is perfect and helped me figuring out what was wrong. I believe I had installed the wrong NuGet package.
Following your advices here are the steps that worked for me:

For Visual Studio 2012: Tutorial you referred to

- Install System.Data.SQLite 1.0.94.0 from This link
Select the appropriate file for target O.S. and .NET framework version.
During installation I selected all checkboxes.

It is important that the DDEXprovider version matches the version of the current SQLite EF6 NuGet package that you use in your project!

- Install Entity Framework 6.1.2 Visual Studio tools from This Microsoft link

- Install NuGet package: System.Data.SQLite.EF6 (1.0.94.0).
EntityFramework will install automatically as a dependency for this package.

- You must build/rebuild the solution before the SQLite provider shows in the EDM wizard.

- Verify that under Project Properties | References the SQLite dll's are set to copy locally and actually copied to the Bin folder. VS will apparently randomly set the property to False.

- In App.config add a provider in the DbProviderFactories section:
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />

This install worked for me as of 02/20/2015.
 
Share this answer
 
v7

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900