I’m trying to develop a settings application whererby a developer can download a zip file containing a SQLite database and the relevant DLL’s and simple use it by calling Setting.Set and Setting.Get in their code. Using a simple Key/Value pair in the database, this lets users store any setting, for anything.
However, I keep getting the error:
“Could not load file or assembly ‘System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139’ or one of its dependencies. The system cannot find the file specified.”
…when trying to integrate it into a new test app.
I’ve tried the
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
<requiredRuntime version="v4.0.20506"/>
</startup>
</configuration>
section in the App.config but this doesn’t fix the problem.
I’m trying to make the “plug-in” as easy as possible for the end user/developer for re-usability but this is becoming very tedious indeed! >:-(
Any ideas guys?
Thank you for your help!!
You can start by using the latest System.Data.SQLite assembly:
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
Somewhere on that page you’ll find “Precompiled Statically-Linked Binaries for 32-bit Windows (.NET Framework 4.0)” which should be fine for packaging the System.Data.SQLite assembly with your app.
This should also allow you to not use the
useLegacyV2RuntimeActivationPolicy="true"application setting.