0
EDIT: I solved the problem below and others that appeared later. See my answer.
I created a Business project using the Entity Framework (EF) Code First approach. I have a database in Mysql with 8 tables and they all relate even indirectly. EF connected to the database and generated me the context classes and tables. All right so far!
Then I created a MVC project, added the reference to my Business layer and went to try to add a new controller with the views scaffolding one of my tables (the problem occurs with any table, but I will exemplify with the Client one).
Adicionar -> Novo item com scaffold -> Controlador MVC 5 com modos de exibição EF
And this error occurs:
One of my tables has some fields like Enum. However, I have removed any reference to the SQL server provider and I am leaving only the Mysql one. Why it still tries the Sqlserver Provider??
Web.config
<connectionStrings>
<add name="AtividadesNovaContext" connectionString="server=****;user id=****;password=****;database=atividadesnova;persistsecurityinfo=True" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.EntityFramework" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</providers>
</entityFramework>
Installed software and packages
- .NET Framework 4.7.2
- Mysql for Visual Studio 2.0.5
- Mysql Connector . NET 8.0.18
- Mysql.Data.Entityframework 8.0.18
- Entityframework 6.2.0
Does anyone have any idea what might be going on?
EDIT: I updated the version of Mysql for Visual Studio to 2.0.5 (developer version). After this the error changed (updated image). I added new system information.