热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

VisualStudio2012/2013MySQL-MySQLForVisualStudio2012/2013

IwouldliketocreateaEFmodelusingaMySQLdatabase.IamrunningVS2012andVS2013ona64bit

I would like to create a EF model using a MySQL database. I am running VS2012 and VS2013 on a 64 bit machine. What do I need to install to get MySQL to show up in the Entity Data Model Wizard when it's time to add a new connection ? I tried adding MySQL.Data.Entities Nuget package, but I still do not get the option in the wizard. When searching for MySQL .NET Connector, I only find 32 bit downloads. Please advise.

我想使用MySQL数据库创建一个EF模型。我在一台64位机器上运行VS2012和VS2013。当需要添加新连接时,需要安装什么程序才能让MySQL显示在实体数据模型向导中?我试着添加MySQL.Data。实体Nuget包,但我仍然没有得到向导中的选项。在搜索。net连接器时,我只找到32位的下载。请建议。

Thanks

谢谢

enter image description here

UPDATE:

更新:

I ran the MySQL installer again and noticed the MySQL for Visual Studio was not installed. I ran it again and get an error. Here is the end of the install details:

我再次运行MySQL安装程序,发现Visual Studio的MySQL没有安装。我再运行一次,得到一个错误。以下是安装细节:

1: File: license-zlib-net.html, Directory: C:\Program Files (x86)\MySQL\MySQL for Visual Studio 1.0.2\Documentation\Licenses for Third-Party Components\, Size: 17171 1: Action 6:09:56: ManagedDataInstall. Registering data provider in machine.config 1: Action 6:09:56: Rollback. Rolling back action: 1: Registering data provider in machine.config 1: Copying new files 1: Creating folders 1: Updating component registration 1: 1: MySQL for Visual Studio 1.0.2 2: {0D406BCC-D62A-46FB-9AB7-A7BF10FB8B31} 3: 3 1: 1: Final actions. 1: Install error

1:文件:license-zlib-net。Visual Studio 1.0.2 \ html目录:C:\Program Files (x86)\MySQL\MySQL文档为第三方组件\ \许可,大小:17171 1:行动6:09:56:ManagedDataInstall。在机器中注册数据提供程序。配置1:操作6:09:56:回滚。回滚操作:1:在机器中注册数据提供程序。配置1:复制新文件1:创建文件夹1:更新组件注册1:1:Visual Studio 1.0.2的MySQL1:安装错误

I can paste the entire contents of the details, but was hoping there is enough information. Does this offer any clues ? It almost looked like the install was having trouble modifying the machine.config files, but I changed the security on these files by adding "Everyone" to have read and write permission (temporarily).

我可以粘贴所有细节的内容,但我希望有足够的信息。这有什么线索吗?看来安装程序在修改机器时遇到了麻烦。配置文件,但是我通过添加“每个人”来修改这些文件的安全性(暂时)。

6 个解决方案

#1


16  

For Visual Studio 2013 environment, download and install MySQL for Visual Studio 1.1.1 from the link below then you will be able to see MySQL Data Provider in Data Source list.

对于Visual Studio 2013环境,请从下面的链接下载并安装Visual Studio 1.1.1的MySQL,然后您将能够在数据源列表中看到MySQL数据提供程序。

https://cdn.mysql.com/Downloads/MySQLInstaller/mysql-visualstudio-plugin-1.1.1.msi

https://cdn.mysql.com/Downloads/MySQLInstaller/mysql-visualstudio-plugin-1.1.1.msi

#2


2  

Visual Studio 2013 Express cannot be used with MySQL for visual Studio according to the following article: http://dev.mysql.com/doc/connector-net/en/connector-net-visual-studio-install.html

根据以下文章,Visual Studio 2013 Express不能与MySQL一起用于Visual Studio: http://dev.mysql.com/doc/connector-net/en/connector-net visualstudioinstall.html

In the Requirements section the above article mention that:

在需求部分,上面的文章提到:

Requirements
MySQL Connector/Net supports full versions of Visual Studio 2008 and later, although the extent of support is based on your installed versions of MySQL Connector/Net and Visual Studio:

Visual Studio 2013 (***Professional edition and up only***) is supported by MySQL Connector/Net 6.8 and up with the MySQL for Visual Studio product.

Visual Studio 2012 is supported by MySQL Connector/Net 6.7 with MySQL for Visual Studio, and by MySQL Connector/Net 6.6 with the older Visual Studio Plugin.

Since you are using Express version, that may be the porblem.

因为您使用的是快速版本,所以可能是porblem。

#3


1  

You need to download and install MySql Installer. The link is: http://dev.mysql.com/downloads/windows/installer/. For Visual Studio : http://www.mysql.com/why-mysql/windows/visualstudio/

您需要下载并安装MySql安装程序。链接:http://dev.mysql.com/downloads/windows/installer/。对于Visual Studio: http://www.mysql.com/why-mysql/windows/visualstudio/

#4


1  

Strange, I have it in my Visual Studio 2012. I installed mysql-installer-web-community-5.6.15.0.msi, and selected MySql for visual Studio!enter image description here

奇怪的是,我的2012视觉工作室里有。我mysql-installer-web-community-5.6.15.0安装。msi,并为visual Studio选择MySql !

#5


1  

For you to see MySql provider you need both to install MySQL Connector/NET 6.7.x and MySQL for Visual Studio 1.0.2.

要查看MySql提供程序,您需要同时安装MySql Connector/NET 6.7。Visual Studio 1.0.2的x和MySQL。

Or the latest versions MySql Connector/NET 6.8.3 and MySql for Visual Studio 1.1.3.

或者是Visual Studio 1.1.3的MySql Connector/NET 6.8.3和MySql的最新版本。

Bear in mind that if you install Connector/NET thru nuget, it will not register in the machine.config (so is more limited that way).

请记住,如果您通过nuget安装连接器/网络,它将不会在机器中注册。配置(因此更有限)。

#6


0  

If someone using Visual Studio 2013 and having the same issue when using mysql with entity framework.

如果有人使用Visual Studio 2013并且在使用实体框架mysql时遇到同样的问题。

Download MySQL for Visual Studio 1.2.7. and Connector/NET 6.7.5, 6.8.3 or 6.9.x.

为Visual Studio 1.2.7下载MySQL。连接器/网络6.7.5,6.8.3或6.9.x。

Which will resolve your issue.

这将解决你的问题。

Make sure you have system.data and system.data.entity in your reference to the project.

确保你有系统。数据和system.data。实体在你对项目的引用中。


推荐阅读
author-avatar
秋忆道格
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有