The error was due to the fact that I used the .NET Framework 4.0. I dropped to 2.0 and it worked. Sorry for the question. It would be nice to use it with the .NET Framework 4.0.
Edit:
It really works with the .NET Framework 4.0. I had to add these lines of code to the app.config file:
<startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0.30319" sku=".NETFramework,Version=v4.0,Profile=Client" /> </startup>
Also, if you plan to use ado.net in your solution, I have many deployment problems. Everything worked perfectly on development. If you are using ado.net and plan to deploy your application, include also:
<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" /> </DbProviderFactories> </system.data>
if you include this last part in the app.config file, you need to make sure that:

these dlls should be in your output directory.
when deploying, make sure you copy these files to the working directory
source share