title: Problems using Entity Framework 6 and SQLite
body: <p>I'm trying to use Entity Framework with SQLite. I had issues integrating it into my main application, so I started a little test from scratch, exactly following the directions on <a href="http://brice-lambson.blogspot.com/2012/10/entity-framework-on-sqlite.html" rel="noreferrer">http://brice-lambson.blogspot.com/2012/10/entity-framework-on-sqlite.html</a></p>
  
  <p>After all is said and done, I get the following error when running the project:</p>
  
  <blockquote>
    <p>No Entity Framework provider found for the ADO.NET provider with
    invariant name 'System.Data.SQLite'. Make sure the provider is
    registered in the 'entityFramework' section of the application config
    file. See <a href="http://go.microsoft.com/fwlink/?LinkId=260882" rel="noreferrer">http://go.microsoft.com/fwlink/?LinkId=260882</a> for more
    information.</p>
  </blockquote>
  
  <p>My app.config looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
    &lt;/configSections&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /&gt;
      &lt;providers&gt;
        &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
    &lt;system.data&gt;
      &lt;DbProviderFactories&gt;
        &lt;add name="SQLite Data Provider"
              invariant="System.Data.SQLite"
              description="Data Provider for SQLite"
              type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /&gt;
      &lt;/DbProviderFactories&gt;
    &lt;/system.data&gt;
    &lt;connectionStrings&gt;
      &lt;add name="ChinookContext"
            connectionString=
  "Data Source=|DataDirectory|Chinook_Sqlite_AutoIncrementPKs.sqlite"
            providerName="System.Data.SQLite" /&gt;
    &lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Then I saw his post about Entity Framework 6. While it wasn't the exact error I was getting, I tried installing his updated provider via NuGet. The error was gone, but replaced with this one:</p>
  
  <blockquote>
    <p>Could not load file or assembly 'System.Data.SQLite.Linq,
    Version=2.0.88.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or
    one of its dependencies. The located assembly's manifest definition
    does not match the assembly reference. (Exception from HRESULT:
    0x80131040)</p>
  </blockquote>
  
  <p>Additionally, my app.config got changed (slightly) to this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
    &lt;/configSections&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /&gt;
      &lt;providers&gt;
        &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /&gt;
        &lt;provider invariantName="System.Data.SQLite" type="System.Data.SQLite.SQLiteProviderServices, System.Data.SQLite.Linq, Version=2.0.88.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" /&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
    &lt;system.data&gt;
      &lt;DbProviderFactories&gt;
        &lt;add name="SQLite Data Provider" invariant="System.Data.SQLite" description="Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /&gt;
        &lt;remove invariant="System.Data.SQLite" /&gt;
      &lt;/DbProviderFactories&gt;
    &lt;/system.data&gt;
    &lt;connectionStrings&gt;
      &lt;add name="ChinookContext" connectionString="Data Source=|DataDirectory|Chinook_Sqlite_AutoIncrementPKs.sqlite" providerName="System.Data.SQLite" /&gt;
    &lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I've tried everything I can think of to address these errors, nothing has worked. I've tried using the other SQLite binaries; I've tried manually editing the SQLite project to use the EF version 6; I've changed the architectures, I've added and removed the nuget packages over and over, etc.</p>
  
  <p>I have no idea where to go from here.</p>