Ritengo doveroso condivide la corretta procedura di configurazione di Visual Studio 2017 per permettere il funzionamento di Entity Framework 6 con Mysql (fonte https://stackoverflow.com/questions/28241500/cant-create-entity-data-model-using-mysql-and-ef6
- Install “MySQL for Visual Studio” v2.0.5 CTP (MySQL for Visual Studio). Note: Install MySQL for Visual Studio before Connector/NET.
- Install “Connector/NET” v6.9.10 (Connector/Net) Note: I tried using Connector/NET v6.8, v6.10 and v8 first, but none of them worked with Visual Studio 2017.
- Create new Visual Studio Professional 2017 project.
- Download and Install “EntityFramework” v6.2.0 through NuGet, by going to Project Tab/Manage NuGet Packages/Browse -> Entity Framework.
- Add references to
C:\Program Files (x86)\MySQL\Connector.NET 6.9.10\Assemblies\v4.5\MySql.Data.dll
andC:\Program Files (x86)\MySQL\Connector.NET 6.9.10\Assemblies\v4.5\MySql.Data.Entity.EF6.dll
; by Right Clicking over References inside Solution Explorer and selecting Add Reference/Browse ->Browse button. - Add MySQL EF6 provider info inside App.config under entity framework providers as follow:
<entityFramework> <providers> <provider invariantName=”MySql.Data.MySqlClient” type=”MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6″ /> </providers> </entityFramework>
Rebuild project by going to Build tab/Rebuild ProjectName.