SQLite installation issue with Visual C # 2010

I am trying to use SQLite to create databases in Visual C # 2010, but when I select "SQLite Database File", I am not able to specify the database file. I get a dialog that asks me for a connection string. I could not find the connection string that does not give me the error "Could not load the file or assembly" Microsoft.VisualStudio.Data, version = 9.0.0.0, PublicKeyToken = ... "The located manifest of the assembly definition does not match the source link."

I found out that this is because the data tools for Visual Studio were not installed successfully, but I tried uninstalling and reinstalling to no avail. The only relevant stream I could find was http://www.basarat.com/2010/05/sqlite-for-visual-studio-2010.html

I used the latest version of SQLite-1.0.66.0. Anyone have any thoughts?

+4
source share
4 answers

May or may not solve your problem. Here's from my own blog post from my own experience in order to get the latest version of SQLite in Visual Studio 2010 a few days ago:

Current binary installers from sqllite.org to build System.Data.SQLite.NET do not include the Visual Studio designers or the ADO.NET driver required to use SQLite in Server Explorer. Thus, Ive found the winning combination to properly set up my environment.

1. Download and install version 1.0.66.0 from sourceforge.net because the current binary installations on SQLite.org on system.data.sqlite.org do not include the Visual Studio constructor or the installation of the ADO.NET driver.

2.Download and install the latest versions (x86 and x64) from system.data.sqlite.org (currently 1.0.73.0, which contains the SQLite 3.7.6.3 engine). Important Note. If you have Visual Studio 2008 and 2010, be sure to select both when prompted, as I found reports from others who had problems otherwise.

3. Combine the x86 binaries and overwrite the file in C: \ Program Files (x86) \ SQLite.NET \ bin (assuming that you used the default installation location for version 1.0.66.0 and you are using x64 Windows). And if you are in the x64 field, copy the x64 binaries to the C: \ Program Files (x86) \ SQLite.NET \ bin \ x64 directory, overwriting the existing files.

+4
source

Try adding these lines.

<dependentAssembly> <assemblyIdentity name="Microsoft.VisualStudio.Data" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="10.0.0.0" /> </dependentAssembly> 

to C: \ Program Files \ Microsoft Visual Studio 10.0 \ Common7 \ IDE \ .config

Then restart Visual Studio.

+2
source

See this sqlite forum article . The connection string basically includes the file name and some parameters. For instance:

 "Data Source=mydb.db;Version=3;New=True;" 

This will use mydb.db as your sqlite database and use the version 3.0 runtime library (best) and will create a New db file if it does not exist.

0
source

Download the SQLite binaries , extract the zip, go to the bin / Designer folder and run install.exe. Perhaps this will help.

0
source

Source: https://habr.com/ru/post/1346854/


All Articles