错误-尝试通过方法“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 is not compatible with MySql.Data
8.0.11.
MySql.Data.Entity
6.10.7 isn't compatible with MySql.Data
8.0.11.
Oracle 将包重命名为MySql.Data.EntityFramework
适用于 v8.x.您需要卸载MySql.Data.Entity
并安装MySql.Data.EntityFramework
.
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屋!