FIX: An unexpected error occurred in the .NET Framework Data Provider for MySQL

I just upgraded my VS2010 Premium to VS2010 SP1 with the final release of SP1 published in MSDN, and MySQL Connector Net 6.3.7, which was already installed on my PC with the latest versions of MySQL Server, has stopped working and gets broken when adding new DataSource or make a new connection.

An error message appears, which reads-

An unexpected error occurred in the .NET Framework Data Provider for MySQL. Please contact the provider vendor to resolve this problem.

I tried with a repair install of Connector, but it couldn’t help out.

After doing some R&D, I came know that Connector is broken by final release of VS2010 SP1. And also found a work-around to get rid of this situation.

This post describes step by step guide to fix an unexpected error occurred in the .NET Framework Data Provider for MySQL.

Note: This is a temporary solution, therefore you must update latest and greatest version of MySQL Connecter as soon as it available.

How To:

  1. Close all instances of Visual Studio first and then run Registry Editor. (Type regedit in StartSearch or Run DialogBox and press enter)
  2. Now go to following locations:
  3. On 32bit version of Windows

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\DataProviders

    On 64bit version of Windows

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\DataProviders

  4. And rename the sub key {c6882346-e592-4da5-80ba-d2eadcda0359} to backup.{c6882346-e592-4da5-80ba-d2eadcda0359} or which (Default) value reads- .NET Framework Data Provider for MySQL
  5. Now close Registry Editor and re-launch Visual Studio.

Applies To:

  • Visual Studio 2010 SP1 (All Editions)
  • My SQL Connector Net 6.3.X
  • Terry Isaac

    I tried to access the regedit and couldn’t find the data providers

  • Hduahdgiaewiugdsae

    Nice work! 

  • http://www.rapnaveia.com.br/ Anderson

    Wonderful!

  • renu

    hi, thanks for solution. It helped me. :)

  • Clay Harris

    I’m having the same problem, using VS 2010 and .Net COnnector 6.3.7, but the solution provided does not work for me – the window still closes whenever I try to enter a server name or anything

  • BlurBlue

    Hi. I got the same problem but I’m using VS 2005. Is there any solution to solve it?.. I can use data bound for the dropdownlist as the error message keep prompt out and force close VS 2005.