[Solved] Entity Framework MySQL MVC: Unrecognized element providers exception

on Mar 18, 2018 09:47 AM


Today I tried using the Entity Framework with MySQL in my ASP.Net MVC Project.

When it runs I get error.

Unrecognized element 'providers'

Please help.

Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Mar 18, 2018 09:48 AM

This error comes when you use Entity Framework version 5 with MySQL.

You can simply comment out the Provider section, rebuild and then run the project.

      <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
        <parameter value="v13.0" />