How to update System.Data.SQLite

When i’ve tried to use latest version of System.Data.SQLite i’ve ran into some problems and there was no working solution at the english and russian articles. So i’ve decided to create two language version of my solution.

System.Data.SQLite is most powerful library to work with sqlite from .NET. This is ADO.NET provider so we have support of the Entity Framework and other modern features. First versions of the library (due to 1.0.66.0) have been developed by this company. Next versions developed here. Latest version is 1.0.77.0.

At the latest version installer does not add SQLite data provider to the data providers list so we cannot use models auto generating for the Entity Framework. I don’t know why this decision has been made but my goal is to fix this issue. We cannot use 1.0.66.0 version because it is obsolete.

All actions performed on .NET Framework 4 and MSVS 2010.

1. Install 1.0.66.0 version;
2. Install 1.0.77.0 version. I recommend sqlite-netFx40-setup-bundle-x86-2010-1.0.77.0.exe. If installer would not work then use sqlite-netFx40-binary-bundle-Win32-2010-1.0.77.0.zip and install libraries to the GAC manually;
3. Create new app;
4. Add App.Config file to the project with such content:

1
2
3
4
5
6
7
8
9
<?xml version="1.0"?>
<configuration>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SQLite" />
      <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.77.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />
    </DbProviderFactories>
  </system.data>
</configuration>

5. Add System.Data.SQLite.Linq.dll to the References.