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?
-
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?Pieter Müller– Pieter Müller2012-06-06 10:36:18 +00:00Commented 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.Harindaka– Harindaka2012-06-06 11:44:07 +00:00Commented Jun 6, 2012 at 11:44
1 Answer
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.
For your application to access the SQLite database, you will need to add a reference to those two assemblies to your project.
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.
To distribute your application, you simply need to send along the assembly files. The easiest way to do this is to put the two
dllfiles in the installation folder.You can do this by right clicking on the reference in the visual studio Solution Explorer, and selecting Properties. Here, set
Copy LocaltoTrue. Now when your application compiles, a copy of the SQlite assemblies will be put in your target directory.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.