I wrote about getting SQLite up and working in Visual Studio 2010 and your .NET 4.0 projects in June. Then I got distracted with work and didn’t have a chance to come back to my exploration of SQLite until today. So I decided to look to see if we have a new version. Yes, the new System.Data.SQLite install for 18.104.22.168 (SQLite version 22.214.171.124 which includes a few bug fixes) is ready to download and install.
Unfortunately, the designers are still not available, so if you want any designer, however buggy, in Visual Studio, you’re still stuck with my original path in my previous post. (See the readme once you finish the 126.96.36.199 install.)
After a variety of experiments with the new installer, I ended up taking the following steps that led to successfully running my budding test/prototype application. Follow these steps and you won’t go too wrong:
- Uninstall all SQLite related items from Control Panel | Program and Features
- Download and install my favorite free SQLite admin tool from http://osenxpsuite.net/?xp=3.
- Download the latest from http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki. In my case, it was the sqlite-netFx40-setup-bundle-x64-2010-188.8.131.52.exe.
- This will have removed some GAC items and NOT put 184.108.40.206 into GAC. At least on my machine. I could not get the assemblies into the GAC to save my life.
- Make sure your project references are pointed to the correct version and that you have Copy Local set to true.
- Change your config settings to remove useLegacyV2RuntimeActivationPolicy=true from the startup node like this:
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
- Change your config settings in DbProviderFactories to remove strong name reference like this:
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider"
description=".Net Framework Data Provider for SQLite"
type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
- Test to taste.