2

It seems this error is really common when trying to make SQLite connections with ADO.NET, but yet I cannot find any answer to it.

This error occurs when I try to make an ADO.NET connection to my SQLite database. People says its somewhat related to .NET Framework, but I've tried reinstalling all and nothing, it even happens in my other computer.

My .config looks like this

<?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>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <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>
    <DbProviderFactories>
      <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" />
    <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>
</configuration>

The steps I've made since now are:

  • Installing the SQLite and EF6 from nugget package
  • Installing SQLite extension
  • Instaling SQLite for .NET Framework 4 x64 from SQLite page

I don't know what to do, HELP PLEAE

Juanma
  • 31
  • 6
  • 1
    Ok lets start posting links to available solutions (we have no idea you tried or not)...here we go...have you tried this: https://stackoverflow.com/questions/29129796/no-entity-framework-provider-found-for-ef-6-and-sqlite-1-0-96-0 – Renatas M. Aug 06 '18 at 11:51
  • 1
    [I have a working project here](https://github.com/crowcoder/CSharpCrudGrid) with sqlite. Maybe you can use it to compare with your project. But, the error details might give a clue, what is the error and what is your code? – Crowcoder Aug 06 '18 at 11:53
  • Yes @Reniuz, I've tried all of those again now and nothing, still the same error, any clue? – Juanma Aug 06 '18 at 12:06
  • Thanks @Crowcoder, I've tried to copy your .config file but nothing, which steps did you do when intalling all? – Juanma Aug 06 '18 at 12:06
  • @Juanma I believe I just installed everything from NuGet which you can see from the packages.config file. – Crowcoder Aug 06 '18 at 12:09
  • Are you sure you tried those? Are you sure you marked Copy Local for required references as noted in the answers? – Renatas M. Aug 06 '18 at 12:10
  • Yes, but I can't find the "Copy Local" property in VS2015 @Reniuz – Juanma Aug 06 '18 at 15:03
  • Then no you haven't tried. Select any reference(in project References) and in properties window you will find Copy Local option. If you still can't find...google images of "Copy Local Visual studio" – Renatas M. Aug 07 '18 at 07:22
  • All of them are selected, I mean, Copy Local on True @Reniuz – Juanma Aug 07 '18 at 08:39

0 Answers0