Could not load file or assembly ‘MySql.Data, Version=

It sounds i am 2 years late answering this post but it might be helpful for those who are still facing this issue, so here is my finding dated 1st April 2012 5pm EST:

I had the same issue with one of my web application. And I found the said issue arises when you do:

  • Copy & Paste the MySql.Data.dll somewhere in a folder.
  • You have a copy of any version of MySql.Data.dll in GAC

Though application works fine on your development machine as it can see the files but when you deploy it on some other machine it actually brings the run time error.

In my case, the VS2008 always pointed me with the same error as you mentioned. I then did this:

  • Removed the local copy reference of the dll
  • Referenced the DLL found in GAC
  • And set the property “Copy Local” to “True” of the DLL by right-clicking->properties.


Somebody asked “Where is GAC?”:

Leave a Comment