View Ticket
Not logged in
Ticket UUID: 2a09baf70cf1f738497b3bd4d44c61bfbb7238b7
Title: Conflicting providers between design-time setup and NuGet package
Status: Closed Type: Incident
Severity: Important Priority: Medium
Subsystem: VsDesignerInstaller Resolution: Fixed
Last Modified: 2014-06-03 03:00:07
Version Found In: 1.0.92
User Comments:
anonymous added on 2014-04-01 19:56:49:
Installed sqlite-netFx451-setup-bundle-x86-2013- and the provider is correctly added to VS2013 so I can create and connect to a database.

In a project I add System.Data.Sqlite (x86/x64) from nuget and these packages are installed:

<package id="EntityFramework" version="6.0.2" targetFramework="net451" />
  <package id="System.Data.SQLite" version="" targetFramework="net451" />
  <package id="System.Data.SQLite.Core" version="" targetFramework="net451" />
  <package id="System.Data.SQLite.EF6" version="" targetFramework="net451" />
  <package id="System.Data.SQLite.Linq" version="" targetFramework="net451" />

When I start the wizard "ADO.NET Entity Data Model" a message say that is not possible to find a compatible provider.

I see that connection strings point to System.Data.SQLite instead System.Data.SQLite.EF6.

If I change in app.config 

<Provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />


<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.SQLiteProviderServices, System.Data.SQLite.EF6" />

I get System.Data.Entity.Core.ProviderIncompatibleException (ADO.NET provider with invariant name "System.Data.SQLite.EF6" is either not registered in machine or application config file, or could not be loaded.)

I tried every trick found on internet but nothing works.

mistachkin added on 2014-04-01 22:48:20:
Installing the setup package should not be necessary to make use of the EF6
support.  Currently, it is not possible to use the design-time components
for Visual Studio with the NuGet package on the same machine.

anonymous added on 2014-04-02 17:06:28:
I apologize, I'm not sure I understand the reply. Please, note that I'm not the original poster.

Are you suggesting that we install the package with design-time components on the developer machines, and not use the NuGet libraries at all? Would we set our references in the project to point to the libraries in the GAC? Would it be possible to setup our build machine such that it pulls the libraries from NuGet?

Are there plans to update the NuGet package to be compatible with the design-time components?

I also have Visual Studio 2013, Entity Framework 6.0.2, and System.Data.SQLite

mistachkin added on 2014-04-02 19:29:32:
Based on my experience, there are some limitations imposed by Visual Studio on
installed design-time packages, mainly that assemblies used by the primary package assembly (e.g. "SQLite.Designer.dll") must be located in the GAC.

In order to be able to support Entity Framework 6 with the installed design-time
package, the Entity Framework 6 assembly would need to be in the GAC as well.
Unfortunately, the deployment guidelines for Entity Framework 6 do not permit

anonymous added on 2014-05-08 16:29:36:
Firstly, I assume we are talking about the problem in the screenshot here

Based on the replies, I tried to remove the nuget (v1.0.92) and instead added all the refs manually that I could find to be relevant, but it still did not work, same error?

The refs that I added through the Visual Studio Add Reference dialog were:
C:\Program Files (x86)\System.Data.SQLite\2013\bin\EntityFramework.dll
C:\Program Files (x86)\System.Data.SQLite\2013\bin\System.Data.SQLite.dll
C:\Program Files (x86)\System.Data.SQLite\2013\bin\System.Data.SQLite.EF6.dll
C:\Program Files (x86)\System.Data.SQLite\2013\bin\System.Data.SQLite.Linq.dll
and just in case
C:\Program Files (x86)\System.Data.SQLite\2013\bin\SQLite.Designer.dll

I also tried the refs from GAC folder rather than bin, but still did not work:
C:\Program Files (x86)\System.Data.SQLite\2013\GAC\System.Data.SQLite.dll
C:\Program Files (x86)\System.Data.SQLite\2013\GAC\System.Data.SQLite.Linq.dll
(and changed copy local to true just in case)

As well as adding the same things into app.config that the nuget installer did (see p.p.p.s)

I need to create a model (edmx file) from an existing sqlite database and would like to use the Visual Studio wizard for that purpose.. I dont really know what is needed, could you advise if there is a way to make it work? 

p.s. the steps i followed are pretty much all in the following two links, except for using the most up to date 4.5.1 setup that should be the only one that works with Visual Studio 2013

p.p.s. removing nuget removed the following entries from the csproj file

<Reference Include="EntityFramework">
    <Reference Include="EntityFramework.SqlServer">

<Reference Include="EntityFramework.SqlServer">

<Reference Include="System.Data.SQLite">
    <Reference Include="System.Data.SQLite.EF6">
    <Reference Include="System.Data.SQLite.Linq">

    <Content Include="x64\SQLite.Interop.dll">
    <Content Include="x86\SQLite.Interop.dll">


        <!-- For more information on Entity Framework configuration, visit -->
        <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

        <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" />
        <remove invariant="System.Data.SQLite.EF6" />
        <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".Net Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
      <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
          <parameter value="v11.0" />
        <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
        <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />

anonymous added on 2014-05-09 09:28:29:
got much more info and help from here

but new error now : System.Data.Entity.Core.ProviderIncombatibleException

mistachkin added on 2014-05-09 17:34:00:
The confusion with the configuration file sections should mostly be cleared up
by trunk check-in [c4216e296b6fe91decac6646b6d2a4118e6a852d], which will be part
of release  In the meantime, using with manually modified
configuration files (i.e. to point to the EF6 provider) is recommended.

mistachkin added on 2014-06-03 02:58:10:
This scenario appears to work as of trunk (which will eventually become

mistachkin added on 2014-06-03 03:00:07:
Also see ticket [3c00ec5b52].