Page 1 of 1

dotConnect for SQLite Provider not found 5.1.55.0 Pro

Posted: Thu 12 Feb 2015 14:47
by jhsu42
Hi, we're experiencing an odd situation on a deployment of our application. We're using the dotConnect for SQLite provider with code-first implementation to create our database files. This works most of the time, however, on some installs, the provider is not found. The libraries are registered in the GAC and the app.config has the above entry in it, but our application fails when trying to create our SQLite databases. The exception that's thrown is as follows:

Code: Select all

Error detected in LaunchProjectDialog in the DbContext./nError Message: No Entity Framework provider found for the ADO.NET provider with invariant name 'Devart.Data.SQLite'. Make sure the provider is registered in the 'entityFramework' section of the application config file.
During our install, we install the dotConnect libraries and set the following entries in the app.config of our host application.

Code: Select all

<configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework,  Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <entityFramework>
    <providers>
      <provider invariantName="Devart.Data.SQLite" type="Devart.Data.SQLite.Entity.SQLiteEntityProviderServices, Devart.Data.SQLite.Entity, Version=5.1.55.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </providers>
  </entityFramework>
One thing to note is that the particular machine we are having issues on is heavily locked down with restricted security permissions. Are there any system settings that get set during install or needed during execution that may be restricted because of these permission settings?

Re: dotConnect for SQLite Provider not found 5.1.55.0 Pro

Posted: Fri 13 Feb 2015 14:52
by Shalex
Additionally, you should register configuration information in the DbProviderFactories section of the *.config file to inform your environment about the existence of the provider factory:

Code: Select all

<system.data>
  <DbProviderFactories>
    <remove invariant="Devart.Data.SQLite" />
    <add name="dotConnect for SQLite" invariant="Devart.Data.SQLite" description="Devart dotConnect for SQLite" type="Devart.Data.SQLite.SQLiteProviderFactory, Devart.Data.SQLite, Version=5.1.55.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
  </DbProviderFactories>
</system.data>
Replace 5.1.55.0 here with your actual version.
Note that the revision number of provider in the entityFramework section is *.6 but in DbProviderFactories - *.0.

For more information, refer to
http://www.devart.com/dotconnect/sqlite ... yment.html
http://www.devart.com/dotconnect/sqlite ... pport.html
http://blog.devart.com/entity-framework ... force.html