Steve Hoag has covered a lot of ground in troubleshooting LightSwitch Beta 2 related problems. Still there are problems that may arise due to various interactions. This post is regarding one such problem.
What was the problem?
LightSwitch can source data not only from SQL Servers, SharePoint lists and WCF RIA Services but can also obtain its data from MySQL and Oracle albeit limited to certain versions. By installing the MySQL Connector (Connector/Net 6.3.6) from here and executing the msi you can start seeing the MySQL Provider in the Change Data Source Window after the Connection Properties window in LightSwitch. After which it is real easy.
Due to some corruption problems with the LightSwitch it was reinstalled which required reinstalling VS2010 SP1. After these changes it became clear that the Database Wizard on the reinstalled Beta 2 was broken (could not connect to any databases) as it came back with this error,
This was followed with this error,
Microsoft Visual Studio Message:
"An unexpected error occurred in the .NET Framework Data Provider for MySQL. Please contact the provider vendor to resolve this problem"
"An unexpected error occurred in the .NET Framework Data Provider for MySQL. Please contact the provider vendor to resolve this problem"
Now the Connection Properties Window does not show up anymore.
Solution:
I ran the msi file (mysql-connector-net-6.3.6.msi) once again choosing to repair. The operation completed but did not add the required DbProviderFactories entry in the machine.config file. The problem persisted.
Finally, I uninstalled the MySQL Connector and now the LightSwitch Database Wizard is happy and I see the Connection Properties Window popping-up. Of course to connect to MySQL Databases I will have to install the connector again.
