Solve: Your project references the latest version of Entity Framework (for MySQL) in Visual Studio 2...

The error message while trying to create a ADO.net Entity Data Model ( Entity Framework 6 ) for MySql Database in Microsoft Visual Studio 2013

" Your project references the latest version of Entity Framework; however, an Entity Framework database provider compatible with this version could not be found for your data connection. if you have already installed a have already installed a comptible provider, ensure you have rebuilt your project before performing this action. Otherwise, exit this wizard, install a compatible provider, and rebuid your project before performing this action."



Solution: 


1. Before start solution steps, check the following Pre-requirements:

 

2. Registering EF providers

  • Remove the default entityFramework tag in App.config or Web.config
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>

  

  • Add the following entityFramework tag:
  <entityFramework>
    <defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
    <providers>
      <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
    </providers>
  </entityFramework>
 



3. Adding The following References to your project or check it versions:

  • MySql.Data.dll
  • MySql.Data.Entity.EF6.dll
  • MySql.Web.dll
     They should reside the following  folders:
 
  • C:\Program Files\MySQL\MySQL Connector Net 6.8.3\Assemblies\v4.5 (32bit windows)
  • C:\Program Files (x86)\MySQL\MySQL Connector Net 6.8.3\Assemblies\v4.5 (64bit windows)

 

 


4. Rebuild your project


5. Re-perform your steps of add ADO.NET Entity Data Model

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值