Ticket Hash: | 5989b59310b03e740fc0e3b67272d14f05bb56a2 | |||
Title: | Unable to determine the provider name for provider factory of type 'System.Data.SQLite.SQLiteFactory'. with the Nuget package version 1.0.94.1 | |||
Status: | Closed | Type: | Incident | |
Severity: | Critical | Priority: | Medium | |
Subsystem: | NuGetPackage | Resolution: | Duplicate | |
Last Modified: | 2014-10-14 16:42:59 | |||
Version Found In: | 1.0.94.1 | |||
User Comments: | ||||
anonymous added on 2014-10-12 19:46:50:
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: http://stackoverflow.com/questions/26327811/unable-to-determine-the-provider-name-for-provider-factory-of-type-system-data 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"?> <configuration> <configSections> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> </configSections> <appSettings> <add key="PersistenceDirectory" value="c:\code\PMPersistence" /> </appSettings> <connectionStrings> <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" /> </connectionStrings> <entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> <parameters> <parameter value="mssqllocaldb" /> </parameters> </defaultConnectionFactory> <providers> <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" /> </providers> </entityFramework> <system.data> <!-- 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. --> <DbProviderFactories> <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" /> </DbProviderFactories> </system.data> </configuration> anonymous added on 2014-10-12 20:03:16: 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: Apparently, a duplicate of [2be4298631].
mistachkin added on 2014-10-14 16:42:59: From the duplicate ticket, try also removing the line that starts with: <remove invariant="System.Data.SQLite" ... /> |