4

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.

4

2 回答 2

8

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.

于 2013-07-05T23:39:23.637 回答
4

对于 VS 2013,我必须执行以下操作:

使用MySQL 社区安装程序安装/更新您的 MySQL

  • 请务必在下图中添加应用程序功能:

在此处输入图像描述

现在我在 Visual Studio 中将 MySQL 数据库作为数据源选项:

在此处输入图像描述

于 2014-02-18T02:06:15.397 回答