c# - Mysql + Visual Studio 2012 "Failed to find or load the registered .Net Framework Data Provider"

标签 c# mysql visual-studio visual-studio-2012 entity-framework-5

Mysql + Visual Studio 2012

"Failed to find or load the registered .Net Framework Data Provider"

大家好,我想就我遇到的这个错误寻求帮助。我将 Visual Studio 2012 与 entity framework 5 和通过此链接下载的 mysql 一起使用 http://dev.mysql.com/tech-resources/articles/mysql-installer-for-windows.html .在项目中,我添加了带有“从数据库生成”的 ADO.NET 实体数据模型,这是带有端口 3307 的 MySql(其他人使用 3306)。我测试了连接,它显示“测试连接成功”。因此,我开始使用对数据库的插入查询进行编码。当我测试运行时,它挂断了并说

"Failed to find or load the registered .Net Framework Data Provider". 

非常感谢您的帮助。提前致谢。

最佳答案

最简单的答案就是通过 NuGet 安装 MySQL.Data 和 MySQL.Data.Entities 包。仅使用 MySQL for Windows 安装程序不会添加您需要的必要 DLL 和项目引用,但 NuGet 会自动为您完成。

这是一个链接...使用前 2 个包:http://www.nuget.org/packages?q=mysql

关于c# - Mysql + Visual Studio 2012 "Failed to find or load the registered .Net Framework Data Provider",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18660461/

相关文章:

c# - EventSource - 无法获取要应用的方法签名更改

mysql - 如何更改MYSQL中的数据描述

c# - 来自 Visual Studio 2010 中所有注释的文档

visual-studio - 签名者的证书对于签名无效

c++ - 在 visual studio 2008 中输出

C# 检查 Datetime.now 是否为特定时间

c# - RestSharp 与 WebRequest 相比的性能问题

C# 帮助 - FileSystemWatcher 类

php - 带按钮的宽度表列 Bootstrap 3.3

php - 当我在 PHP/mySQL 中使用 MATCH、AGAINST 时警告 mysql_fetch_array