Entity Framework provider for an ADO-out provider with a fixed name of "System.Data.SQLite" not Found

Source: Internet
Author: User
Tags connectionstrings



User code not processed System.InvalidOperationException
hresult=-2146233079
Message= The Entity Framework provider for the ADO-out provider with the fixed name "System.Data.SQLite" was not found. Make sure that the provider is registered in the "EntityFramework" section of the application configuration file. For more information, see http://go.microsoft.com/fwlink/?LinkId=260882.
Source=entityframework
StackTrace:






Webconfig


 
<connectionStrings>
    <add name="UserConnection" connectionString="data source=|DataDirectory|\UserRole.s3db" providerName="System.Data.SQLite"/>
    <!--<add name="UserModel" connectionString="data source=(LocalDb)\v11.0;initial catalog=UserRole.Models.UserModel;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />-->
  </connectionStrings>
  <system.data>
    <DbProviderFactories>
      <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,
           Version=1.0.93.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/>-->
      <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" />
    </DbProviderFactories>
  </system.data>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>


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



Switch



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



Entity Framework provider for an ADO-out provider with a fixed name of "System.Data.SQLite" not Found


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.