The error message while trying to create a ADO. NET entity Data Model (Entity Framework 6) for MYSQL Database in Microsof T Visual Studio 2013
"
Your Project references the latest version of the Entity Framework; However, an Entity framework database provider Compati Ble with this version could is found for your data connection. If you have already installed A has already installed a comptible provider, ensure you have rebuilt your project before P Erforming 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:
- You completely install mysql-installer-Community-5.7.3.0-m13.msi or install both of Mysql-visualstudio-plugin-1.1.1.msi and Mysql-connector-net-6.8.3.msi.
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 followingFolders:
- 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 Entity Data Model
Solve:your Project references the latest version of the Entity Framework (for MySQL) in Visual Studio 2013