方法'X.set_DbConnection(System.Data.Common.DbConnection)'试图访问方法'Y.get_Settings()的错误尝试失败 [英] Error-Attempt by method 'X.set_DbConnection(System.Data.Common.DbConnection)' to access method 'Y.get_Settings()' failed
问题描述
我创建了一个控制台应用程序,并使用EntityFramework 6.2(用于与MS SQL连接),MySql.Data 8.0.11和MySql.Data.Entity 6.10.7(用于与MySQL连接).
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).
在此应用程序中,我想创建一个类似于SQL作业的作业,但是我不想使用quertz.net.我有错误:
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:
尝试通过方法'MySql.Data.Entity.EFMySqlCommand.set_DbConnection(System.Data.Common.DbConnection)'访问方法'MySql.Data.MySqlClient.MySqlConnection.get_Settings()'失败."
"Attempt by method 'MySql.Data.Entity.EFMySqlCommand.set_DbConnection(System.Data.Common.DbConnection)' to access method 'MySql.Data.MySqlClient.MySqlConnection.get_Settings()' failed."
推荐答案
MySql.Data.Entity
6.10.7与MySql.Data
8.0.11不兼容.
MySql.Data.Entity
6.10.7 isn't compatible with MySql.Data
8.0.11.
Oracle 将软件包重命名为
Oracle renamed the package to MySql.Data.EntityFramework
for v8.x. You need to uninstall MySql.Data.Entity
and install MySql.Data.EntityFramework
.
这篇关于方法'X.set_DbConnection(System.Data.Common.DbConnection)'试图访问方法'Y.get_Settings()的错误尝试失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!