Solve: Your project references the latest version of Entity Framework (for MySQL) in Visual Studio 2013
The error message while trying to create a ADO.net Entity Data Model ( Entity Framework 6 ) for MySql Database in Microsoft Visual Studio 2013
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
- 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
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。