Conflicting versions of MySql.Data.dll in .Net project not allowing me to change TableAdapters

  • Last Post 05 December 2016
  • Topic Is Solved
erportico posted this 05 December 2016

I have a WinForms / .Net 4.0 application in Visual Studio 2015 Update 3. When I try to add, or edit, a TableAdapter in any of my DataSets, I get this error:

MySql Dataset Error Drag

The wizard detected the following problems when configuring the TableAdapter:


Generated SELECT statement. [A]MySQL.Data.MySqlClient.MySqlConnection cannot be cast to [B]MySQL.Data.MySqlClient.MySqlConnection. Type A originates from 'MySQL.Data Version, Culture=neutral,PublicToken=c5687fc88969c44d' in context 'Default' at location 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\MySQL.Data.dll'. Type B originates from 'MySQL.Data, Version, Culture=neutral, PublicKeyToken=c5687fc88969c44d' in context 'Default' at location 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\MySQL.Data\v4.0_6.9.9.0_c5687fc88969c44d\MySQL.Data.dll'.

Obviously it is complaining about two different versions of the MySQL.Data.dll 6.9.8 and 6.9.9. What I don't understand though is why or where is it referencing version If I look at my project's references, it is using MySQL.Data.dll version This is a NuGet package at location:


I've tried the solution at [A]MySql.Data.MySqlClient.MySqlConnection cannot be cast to [B]MySql.Data.MySqlClient.MySqlConnection but didn't work.

I've searched my entire solution for any references to 6.9.8 and I've found nothing. I've been Googling for a solution for a whole day now and have found nothing that's worked. Any ideas anyone? Thank you...

admin posted this 05 December 2016

The problem is with MySQL Connector / Net. It is using version of the DLL and everything else is using Go to your community installer and uninstall connector / net. Then go to and get version 6.9.8 of the connector / net. Install this and everything should be fine. It has worked on my system.