MySQL Forums
Forum List  »  MySQL for Visual Studio

Re: Entitiy Framework Wizard crashes
Posted by: JOSE RAMIREZ
Date: August 30, 2019 02:17PM

Hello Charles,

the wizard crashing is usually associated to the config file not containing the correct information. I'd recommend using the latest version of MySQL for Visual Studio (1.2.9) and MySQL Connector/NET(8.0.17) and to make sure that the following entries can be found in the web.config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
...
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=8.0.17, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<entityFramework>
<defaultConnectionFactory type="MySql.Data.EntityFramework.MySqlConnectionFactory, MySql.Data.EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework, Version=8.0.17, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>


Specifying the correct MySQL Connector/NET version (8.0.17 in this case) and the correct EF assembliy (MySql.Data.EntityFramework) is important. Also, make sure that your project references the EntityFramework, EntityFramework.SqlServer, MySql.Data and MySql.Data.EF6/EntityFramework assemblies.

Regards.

====================================
Jose Ramirez
MySQL on Windows Team

Options: ReplyQuote


Subject
Views
Written By
Posted
2267
June 27, 2018 06:51AM
559
October 08, 2018 11:36AM
Re: Entitiy Framework Wizard crashes
352
August 30, 2019 02:17PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.