My question is similar to this one but the crash happens later. I must interoperate an EF database-first model between SQL Server and MySQL. More specifical
In my case, the cause was that the version of the installed mysql connector was different from the version of referenced MySQL.Data.Entity When I referenced the same version all became alright.
It has been answered in another thread, the typical crash reason is the mismatched versions of MySQL connector and MySQL.Data.Entity.
And most likely reason for you to get the wrong version is because of the package name changed from MySQL.Data.Entity to MySql.Data.EntityFramework.
I was spending a lot of time on trying the answers in the thread, so just FYI.
When you look around this seems to be a common problem. I know this way along the trail but late is better then never.
I eventually removed and reinstalled visual studio 2015 and mysql and then started from scratch. I then ensured that I walked through the process bringing in only what was needed.
Before
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
After
<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, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
</providers>
</entityFramework>
This fixed it for me. I am not sure that you need do the reinstall, but for sure you need do step 2.
Good luck.
The problem is the compatibility of MySQL, Visual Studio, connector and MySQL for Visual Studio.
Install the correct versions. (Restart your computer).
- MySQL for Visual Studio 1.2.9 with Connector/NET 8.0.14-MySQL for Visual Studio 1.2.7 with Connector/NET 6.9.9-MySQL for Visual Studio 1.2.7 or 2.0.2 with Connector/NET 6.9.8Open VS and build your project then try to update your entities
Actually I'm using VS professional 2017 with this nuggets MySql.Data 6.9.9 and MySql.Data.Entity 6.9.9(MySQL for Visual Studio 1.2.7 with Connector/NET 6.9.9)