Visual Studio 2012 上的 mySQL 数据源
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12684047/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
mySQL DataSource on Visual Studio 2012
提问by balexandre
I've been reading about mySQL DataSource and the ability to use mySQL with Entity Framework, but I can't really generate EF with mySQL without the use of the DataSource Dialog
我一直在阅读有关 mySQL 数据源以及在实体框架中使用 mySQL 的能力,但如果不使用数据源对话框,我无法真正使用 mySQL 生成 EF
How can I add mySQL Database to such dialog?
如何将 mySQL 数据库添加到此类对话框中?
This is what I have done so far:
这是我到目前为止所做的:
- Installed mySQL Connectorv.6.5.4
- Restarted n-times my Windows 7 machine
- Read all about how well mySQL Connector works on previous versions of Visual Studio
- 已安装mySQL 连接器v.6.5.4
- 重新启动了 n 次我的 Windows 7 机器
- 阅读有关 mySQL 连接器在早期版本的 Visual Studio 上的工作情况的所有信息
采纳答案by balexandre
I have just read from mySQL Forums that mySQL will ship Visual Studio 2012 integration with mySQL Connector v.6.5.5
我刚刚从 mySQL 论坛上了解到,mySQL 将发布 Visual Studio 2012 与 mySQL Connector v.6.5.5 的集成
We'll be adding support for VS 2012 in Connector/NET 6.5.5 and later 6.6.x version http://forums.mysql.com/read.php?38,546265,564533#msg-564533
我们将在 Connector/NET 6.5.5 和更高版本 6.6.x 版本中添加对 VS 2012 的支持 http://forums.mysql.com/read.php?38,546265,564533#msg-564533
and give a link to test a trick
并给出一个测试技巧的链接
and here is the vsix
file if you follow the tutorial(In Portuguese)
vsix
如果您按照教程操作,这里是文件(葡萄牙语)
Microsoft Visual Studio Extensionfor mySQL: http://cl.ly/JqXO
适用于 mySQL 的Microsoft Visual Studio 扩展:http: //cl.ly/JqXO
just download and double click...
只需下载并双击...
then, you will get all to work
然后,您将开始工作
Using Visual Studio 2012 Professional
使用 Visual Studio 2012 专业版
回答by SwiftHanded
One clarification: Visual Studio Express DOES NOT support MySQL .NET Connector as extension.
一个澄清:Visual Studio Express 不支持 MySQL .NET 连接器作为扩展。
You still may use it adding reference to MySql.Data.dll file that you may find in MySQL Connector installation folder (for me it was W:\Program Files\MySQL\Connector NET 6.5.4\Assemblies\v4.0). After that you may use it like this:
您仍然可以使用它添加对 MySQL Connector 安装文件夹中的 MySql.Data.dll 文件的引用(对我来说,它是 W:\Program Files\MySQL\Connector NET 6.5.4\Assemblies\v4.0)。之后,您可以像这样使用它:
using MySql.Data.MySqlClient;
...
var mycon = new MySqlConnection();
回答by David Broadfoot
According to this page: http://dev.mysql.com/downloads/connector/net/
根据这个页面:http: //dev.mysql.com/downloads/connector/net/
"Starting with version 6.7, Connector/Net will no longer include the MySQL for Visual Studio integration. That functionality is now available in a separate product called MySQL for Visual Studio available using the MySQL Installer for Windows (see http://dev.mysql.com/tech-resources/articles/mysql-installer-for-windows.html)."
“从 6.7 版开始,Connector/Net 将不再包含用于 Visual Studio 集成的 MySQL。该功能现在可在名为 MySQL for Visual Studio 的单独产品中使用,该产品可使用适用于 Windows 的 MySQL 安装程序(请参阅http://dev.mysql .com/tech-resources/articles/mysql-installer-for-windows.html)。”
回答by John Woo
Visual Studio 2012 is not yet supported by MySQL Connector v.6.5.4
. You can't add a connection to MySQL in the Server Explorer to begin with.
.NET 尚不支持 Visual Studio 2012 MySQL Connector v.6.5.4
。您无法开始在服务器资源管理器中添加到 MySQL 的连接。
According on this post, support will be added on MySQL Connector v.6.5.5
根据这篇文章,将添加支持MySQL Connector v.6.5.5
回答by Fernando Gonzalez Sanchez
Connector/NET 6.5.5 does not support VS2012, but Connector/NEt 6.6.x does.
Connector/NET 6.5.5 不支持 VS2012,但 Connector/NEt 6.6.x 支持。
However Visual Studio Express editions are not supported, hence the only way to work in Entity Framework and Visual Studio Express and MySql (or other database different than SQL Server for that matter) is using code first.
但是,不支持 Visual Studio Express 版本,因此在 Entity Framework 和 Visual Studio Express 和 MySql(或其他与 SQL Server 不同的数据库)中工作的唯一方法是首先使用代码。
回答by rainabba
It wouldn't matter if you had the MySQL driver showing as far as I can tell. I'm running VS 2012.3 and if I try to create a Data Connection in VS Server Browser, I can get as far as selecting the MySQL driver and no more. If I try typing a servername/username/password (any of the fields), the window just disappears and YES, it's only when the MySQL driver is being used so NO it's not vs (not exclusively) causing the problem. Go ahead and say that it's my environment but you'd not be able to justify that even remotely compared to the FACT of what is happening. ALL my other software/extentions/add-in/libraries work just fine. No surprise either seeing how buggy the "3 minute" Windows Installer was. Had to uninstall/reinstall a server instance to get to the configuration wizard and there is no other apparent way to configure an instance without it. I'd rather have the old setup. /rant
据我所知,如果您显示了 MySQL 驱动程序,这并不重要。我正在运行 VS 2012.3,如果我尝试在 VS 服务器浏览器中创建数据连接,我只能选择 MySQL 驱动程序,仅此而已。如果我尝试输入服务器名/用户名/密码(任何字段),窗口就会消失,是的,只有在使用 MySQL 驱动程序时才会出现,所以不是(不是唯一)导致问题的原因。继续说这是我的环境,但与正在发生的事情的事实相比,即使是远程也无法证明这一点。我所有的其他软件/扩展程序/插件/库工作得很好。看到“3 分钟”Windows Installer 有多么糟糕,也就不足为奇了。必须卸载/重新安装服务器实例才能进入配置向导,没有它就没有其他明显的方法来配置实例。我宁愿有旧的设置。/咆哮
回答by dellyjm
Downloaded and install Download MySQL for Visual Studio http://dev.mysql.com/downloads/windows/visualstudio/1.1.html
下载并安装 下载 MySQL for Visual Studio http://dev.mysql.com/downloads/windows/visualstudio/1.1.html