Home >Database >Mysql Tutorial >How to Fix \'Error in Setting DbConnection: MySql.Data.Entity Incompatibility with MySql.Data\'?
Error in Setting DbConnection: MySql.Data.Entity Incompatibility with MySql.Data
Consider the following issue: while developing a console app utilizing EntityFramework 6.2 for MS SQL and MySql.Data 8.0.11 for MySQL, a specific job creation error arises. The error message reads, "Attempt by method 'MySql.Data.Entity.EFMySqlCommand.set_DbConnection(System.Data.Common.DbConnection)' to access method 'MySql.Data.MySqlClient.MySqlConnection.get_Settings()' failed."
The culprit behind this error lies in the incompatibility between MySql.Data.Entity 6.10.7 and MySql.Data 8.0.11. This discrepancy stems from Oracle renaming the package to MySql.Data.EntityFramework for versions 8.x onwards.
Resolution:
To rectify this issue, follow these steps:
The above is the detailed content of How to Fix \'Error in Setting DbConnection: MySql.Data.Entity Incompatibility with MySql.Data\'?. For more information, please follow other related articles on the PHP Chinese website!