Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error-Attempt by method 'X.set_DbConnection(System.Data.Common.DbConnection)' to access method 'Y.get_Settings()' failed

I created a console app and use EntityFramework 6.2 (for connection with MS SQL), MySql.Data 8.0.11 and MySql.Data.Entity 6.10.7 (for connection with MySQL).

In this application I want to create a job like an SQL job but I don't want to use quertz.net. I have error:

"Attempt by method 'MySql.Data.Entity.EFMySqlCommand.set_DbConnection(System.Data.Common.DbConnection)' to access method 'MySql.Data.MySqlClient.MySqlConnection.get_Settings()' failed."

like image 943
Oyama Avatar asked May 07 '18 14:05

Oyama


1 Answers

MySql.Data.Entity 6.10.7 isn't compatible with MySql.Data 8.0.11.

Oracle renamed the package to MySql.Data.EntityFramework for v8.x. You need to uninstall MySql.Data.Entity and install MySql.Data.EntityFramework.

like image 124
Bradley Grainger Avatar answered Sep 29 '22 04:09

Bradley Grainger