0

How can I manually add the SQLite Entity Framework 4.0 provider without using the installer setup so that the Visual Studio New EDMX wizard will be able to use it to create a new data model?

2
  • Please provide some details. Are you referring to the System.Data.SQLite provider? What is the problem with running the installer setup to activate the Design Time support? Commented Jun 6, 2012 at 10:36
  • I basically need to deploy the solution via XCopy when Im done with the project. Hence I need to be certain whether simply placing the required assemblies in the correct places and editing any configuration would be enough. Commented Jun 6, 2012 at 11:44

1 Answer 1

1

I'm not sure which provider you are using, but I am asuming you are using the System.Data.SQLite provider available from http://system.data.sqlite.org/

In order to use the Design Time support in Visual Studio, you must download the installer and install everything. This will setup the Design Time support and also install the System.Data.SQLite and System.Data.SQLite.Linq assemblies into your development machine's Global Assembly Cache.

  1. For your application to access the SQLite database, you will need to add a reference to those two assemblies to your project.

  2. To do this, right click on the project and select "Add Reference". If you ran the installer, the two assemblies will be in the list. If you can't find them, download the assembly files from the website, put them anywhere on your drive and reference them by selecting the file.

  3. To distribute your application, you simply need to send along the assembly files. The easiest way to do this is to put the two dll files in the installation folder.

  4. You can do this by right clicking on the reference in the visual studio Solution Explorer, and selecting Properties. Here, set Copy Local to True. Now when your application compiles, a copy of the SQlite assemblies will be put in your target directory.

  5. If you are deploying the files manually, simply copy along the assembly files and keep them in the same folder as your executable. If you are using One-Click Deployment or any other kind of Deployment, make sure the assemblies are deployed together with your application.

Note that, as far as I know, the assembly version used by the Design Time support must be the same version as the one deployed by your application. So if you update the one, make sure you update the other as well.

Sign up to request clarification or add additional context in comments.

3 Comments

So as far as Entity Framework is concerned there are no other dependencies except for those two files?
If the target machine has .NET 4.0 installed, you're fine with just those two third party assemblies. Does it have .NET installed?
Yes but I had to use the installer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.