mySQL DataSource on Visual Studio 2012

喜夏-厌秋 提交于 2019-12-17 05:04:53

问题


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

How can I add mySQL Database to such dialog?

This is what I have done so far:

  • Installed mySQL Connector v.6.5.4
  • Restarted n-times my Windows 7 machine
  • Read all about how well mySQL Connector works on previous versions of Visual Studio

回答1:


I have just read from mySQL Forums that mySQL will ship Visual Studio 2012 integration with 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

and give a link to test a trick

http://social.technet.microsoft.com/wiki/pt-br/contents/articles/10476.instalando-mysql-connector-no-visual-studio-2011-beta.aspx

and here is the vsix file if you follow the tutorial (In Portuguese)

Microsoft Visual Studio Extension for mySQL: http://cl.ly/JqXO

just download and double click...

then, you will get all to work

Using Visual Studio 2012 Professional




回答2:


One clarification: Visual Studio Express DOES NOT support MySQL .NET Connector as extension.

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:

using MySql.Data.MySqlClient;
...
var mycon = new MySqlConnection();



回答3:


According to this page: 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)."




回答4:


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.

According on this post, support will be added on MySQL Connector v.6.5.5




回答5:


Connector/NET 6.5.5 does not support VS2012, but Connector/NEt 6.6.x does.

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.




回答6:


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




回答7:


Downloaded and install Download MySQL for Visual Studio http://dev.mysql.com/downloads/windows/visualstudio/1.1.html



来源:https://stackoverflow.com/questions/12684047/mysql-datasource-on-visual-studio-2012

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!