BC30560: ‘MySqlConnection’ is ambiguous in the namespace ‘MySql.Data.MySqlClient’.
Dec 01
ASP.NET, MySQL, VB.NET 16 Comments
I got this error in one of my ASP.NET web sites after uploading a new version:
BC30560: ‘MySqlConnection’ is ambiguous in the namespace ‘MySql.Data.MySqlClient’.
It worked fine on my development machine but not on the production server. I could not figure out what it was for quite some time. Turned out I had added the mysql.dll to bin directory of my project and at the same time was referencing a shared (GAC) version of the same dll. I had made this and some other changes on the development machine that I had forgot about. The only thing that differed from the development and production machines was the web.config which I obviously did not check well enough.
Posting this here if someonelse or myself makes this stupid mistake again…

Dec 08, 2008 @ 03:11:00
D’oh… thanks for that… made the same mistake.
Jun 19, 2009 @ 09:19:18
Hi
thanks for posting this…. i made the same mistake
Aug 05, 2009 @ 12:02:01
thank you so much!!
Aug 31, 2009 @ 22:49:22
Dooh,
Ops, I did it again
Jan 17, 2010 @ 13:16:13
i came across this problem
i tried everything but nothing happened
after reading this post i tried removing reference, and imports consecutively.
nothing worked.
Actually, the problem was that i had uploaded, mysql.data.dll ,mysql.data.cf.dll and other assemblies all together, which caused that problem
only you need is mysql.data.dll to be added to bin folder
this Bin folder should be in placed where your app_code folder exists
Aug 21, 2010 @ 01:39:25
thank you so much guys
special thanks to you, Parikshit
Oct 05, 2010 @ 03:48:24
Thanks a lot.
Feb 05, 2011 @ 20:58:14
Cheers mate
Feb 15, 2011 @ 10:24:22
Hi Parikshit,
Thank you for the suggestion, I have also follow the same and now i am getting one more error
Parser Error Message: Unable to initialize provider. Missing or incorrect schema.
Source Error:
Line 22:
Line 23:
Line 24:
Line 25:
Line 26:
Please help me…
Thank you inadvance….
Mar 18, 2011 @ 09:10:32
Thanks guys, managed to resolve it. Parikshit, I like your name
May 29, 2011 @ 09:30:10
Hola
Un posible error esta en algun DATASET dentro de la carpeta APP_CODE.
Prueba eliminandolo y podras ejecutar sin problemas.
Jul 31, 2011 @ 06:57:31
Thank you for this post. Problem solved. It is a lesson now, just add what is needed.
Mar 03, 2012 @ 12:06:07
it worked fine, thanks
Jun 25, 2012 @ 17:30:40
thanks prakshit.
worked like a charm.
Aug 22, 2012 @ 19:01:16
thanks!
Jan 27, 2013 @ 16:25:08
Thx…………………!!!!!!!