View Ticket
Not logged in
Ticket UUID: 5989b59310b03e740fc0e3b67272d14f05bb56a2
Title: Unable to determine the provider name for provider factory of type 'System.Data.SQLite.SQLiteFactory'. with the Nuget package version
Status: Closed Type: Incident
Severity: Critical Priority: Medium
Subsystem: NuGetPackage Resolution: Duplicate
Last Modified: 2014-10-14 16:42:59
Version Found In:
User Comments:
anonymous added on 2014-10-12 19:46:50: (text/x-fossil-plain)
I get the error: Unable to determine the provider name for provider factory of type 'System.Data.SQLite.SQLiteFactory'. when my testcode first accesses a DbContext that should have an underlying SQLite database as its datastore. I have this problem both when installing the Nuget System.Data.SQLite package as the Systen.Data.SQLite.EF6 package. I posted details of the problem, notably the app.confg for the testproject, at StackOverflow: 

I include the app.config for completeness below. It was generated by the installer of the NuGet package. I added the connectionstrings section myself.
<?xml version="1.0" encoding="utf-8"?>
    <!-- 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" />
    <add key="PersistenceDirectory" value="c:\code\PMPersistence" />
    <add name="PrivateMessengerContext" connectionString="DataSource=|DataDirectory|\PrivateMessengerDb.db;version=3" providerName="System.Data.SQLite.EF6" />
    <add name="PasswordContext" connectionString="DataSource=|DataDirectory|\PasswordDb.db; version=3" providerName="System.Data.SQLite.EF6" />
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
        <parameter value="mssqllocaldb" />
      <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" />
        NOTE: The extra "remove" element below is to prevent the design-time
              support components within EF6 from selecting the legacy ADO.NET
              provider for SQLite (i.e. the one without any EF6 support).  It
              appears to only consider the first ADO.NET provider in the list
              within the resulting "app.config" or "web.config" file.
      <remove invariant="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" />

anonymous added on 2014-10-12 20:03:16: (text/x-fossil-plain)
I am using Visual Studio 2013. I tried following the advice given and workarounds applied in the similair thread that pertained to VS 2012, but it still does not work.

mistachkin added on 2014-10-14 16:41:55: (text/x-fossil-plain)
Apparently, a duplicate of [2be4298631].

mistachkin added on 2014-10-14 16:42:59: (text/x-fossil-plain)
From the duplicate ticket, try also removing the line that starts with:

<remove invariant="System.Data.SQLite" ... />