Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use MySQL with Visual Studio 2012 Lightswitch?

How can I use MySQL with Visual Studio 2012 Lightswitch? I want to use Amazon AWS RDS for the MySQL server. I'm getting an error: Failed to find or load the registered .Net Framework Data Provider.

like image 247
BSalita Avatar asked Dec 15 '22 08:12

BSalita


2 Answers

Here's the steps for using MySQL with Visual Studio 2012 Lightswitch:

  1. Install MySQL community installer. I used mysql-installer-community-5.6.12.1.msi.
  2. Optionally install Amazon AWS Tools and SDK: AWSToolsAndSDKForNet.msi
  3. Optionally install Microsoft SQL Server Data Tools: SSDTSetup.exe.
  4. Create a LightSwitch project.
  5. Select: Attach to an External Datasource to summon the Attach Data Source Wizard.
  6. Choose: Database as the source.
  7. In Connection Properties: Hit the Change Datasource button, select MySql Database.
  8. Enter Server name: (Amazon AWS RDS Endpoint), User name (awsuser?), Password (password).
  9. Database name: Hit drop down box. Select database. Click OK.
  10. Import your database objects.
  11. In Solution Explorer, choose File View.
  12. Drill down into Server's References. Right click, Add Reference, search for MySQL references, add MySql.Data.Entities. I was presented with several choices with 6.6.5.0 being the one that worked. YMMV.
  13. You should be good to go.

Step 12 resolves the error: Failed to find or load the registered .Net Framework Data Provider.

like image 165
BSalita Avatar answered Jan 08 '23 23:01

BSalita


For VS 2013 I had to do the following:

Install / Update your MySQL using MySQL community installer

  • Be sure to Add the application feature in the picture below:

enter image description here

Now I get the MySQL Database as a Data Source option in Visual Studio:

enter image description here

like image 35
Chuck Savage Avatar answered Jan 08 '23 21:01

Chuck Savage