This article is a mirror article of machine translation, please click here to jump to the original article.

View: 20335|Reply: 0

[Source] Unable to cast to [B]MySql.Data.MySqlClient.MySqlConnection

[Copy link]
Posted on 12/3/2018 5:55:47 PM | | |
[A] MySql.Data.MySqlClient.MySqlConnection cannot be cast to [B]MySql.Data.MySqlClient.MySqlConnection. Type A derives from "MySql.Data, version=6.9.9.0, culture=neutral, PublicKeyToken=c5687fc88969c44d" (in the context "Default" "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\MySql.Data\v4.0_6.9.9.0___ c5687fc88969c44d\MySql.Data.dll" position). Type B derives from "MySql.Data, version=6.9.12.0, culture=neutral, PublicKeyToken=c5687fc88969c44d" ("C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET in the context "Default" files\vs\c0130247\48af6f4f\assembly\dl3\2f07d3eb\003370fc_75ddd301\MySql.Data.dll").
The reason is that the installation version of mysql-connector-net is inconsistent.

Workaround: Install the unified mysql-connector-net version.





Previous:python crawler, grab Xiaomi to snap up
Next:MySQL Learning Notes' MySQL Parameter
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com