MySQL的连接器,EF6在Visual Studio 2013 [英] MySQL Connector with EF6 in Visual Studio 2013

查看:341
本文介绍了MySQL的连接器,EF6在Visual Studio 2013的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过一个C#.NET Web MVC应用程序连接到MySQL。

I am attempting to connect to MySQL through a C# .NET web MVC application.

我的问题是,当我尝试添加一个ADO.NET实体数据模型,从数据库中生成的,根据我的MySQL连接,我得到了以下错误消息:

My issue is that, when I attempt to add an ADO.NET Entity Data Model, generated from Database, based on my MySQL connection, I get the following error message:

您项目引用最新版本的实体框架;
  然而,实体框架的数据库提供兼容
  该版本可能不适合你的数据连接被发现。
  退出该向导,安装兼容的供应商,
  在执行此操作前重新构建项目

Your project references the latest version of Entity Framework; however, an Entity Framework database provider compatible with this version could not be found for you data connection. Exit this wizard, install a compatible provider, and rebuild your project before performing this action

我运行了以下软件,升级和放大器;加载项:

I'm running the following software, upgrades & add-ons:


  • 的Visual Studio 2013

  • MySQL服务器v5.6.21

  • 的MySQL对于Visual Studio V1.2.3

  • 连接器/ NET v6.9.4

的NuGet包:


  • 的EntityFramework V6.1.1

  • MySQL.Data v6.9.3

  • MySQL.Data.Entities v6.8.3.0

  • SQL.Web v6.9.3

我的web.config中的EntityFramework块:

My web.config, entityFramework block:

    ..
</system.webServer>
<entityFramework>
  <defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
  <providers>
    <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
  </providers>
</entityFramework>
<runtime>
    ..

我已经看了所有其他解决方案,我可以在这里找到关于SO,一般通过谷歌,试图所有这些,没有任何解决方案似乎已经奏效或已经非常不同版本的连接器/ NET或其他程序的必要的。

I have looked at all other solutions I could find here on SO and generally through google, tried all of them and none of the solutions seems to have worked or have been for very different versions of Connector/NET or other of the programs needed.

任何人能发现我在做什么错了?

Can anyone spot what I am doing wrong?

推荐答案

基本的解决办法是重新安装MySQL和VisualStudio中的包括实体和.NET。

Basic solution is to reinstall MySQL and VisualStudio including Entity and .NET.

由于某些原因,我不能肯定为什么,在安装过程中破坏了的DLL,或者至少这是我的经验和其他同事。我们的解决方案已经尝试上述所有与无济于事。那么到底我们试图重新安装,它的工作。这样尝试:)

For some reason, I am not certain why, the installation process corrupts the DLLs, or at least that is the experience I had and other colleagues. Our solution has been to try all of above with to no avail. So in the end we tried to reinstall, and it worked. So try that :)

这篇关于MySQL的连接器,EF6在Visual Studio 2013的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆