EF 6 Reverse Engineer Code First with MYSQL - hangs VS2012 - mysql

I'm trying to do a EF6 reverse engineer code first from a MySql database. Visual Studio hangs dead. I right-click on the project, Entity Framework, Reverse Engineer Code First, select the mysql database provider, test the connection, and then hangs spectacularly. I have to kill the Visual Studio.
Has anyone got this to work with MySQL? Note that I am able to successfully 'Test' the connection when I set up the database link, so it IS talking to my MySQL server because I see all my databases on the server.
I also removed the first line from file
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.CS.ttinclude
Per other posts on StackOverFlow. No change.
This what I have installed:
EF Power Tools Beta 4 in VS
MySQL for Visual Studio 1.1.3 in Windows and VS
MySQL Connector .Net 6.8.3 in Windows
In the solution, I've NuGet-ed the following packages:
EF 6.0.2
MySql.Data
MySQL.Web
MySQL.data.entity.EF6
I'd appreciate any advice on how/if this can be done.
Thanks!
Corey.

Related

Visual studio 2012 connect to MySQL server [duplicate]

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
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
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();
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)."
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
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.
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
Downloaded and install Download MySQL for Visual Studio http://dev.mysql.com/downloads/windows/visualstudio/1.1.html

mySQL DataSource on Visual Studio 2012

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
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
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();
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)."
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
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.
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
Downloaded and install Download MySQL for Visual Studio http://dev.mysql.com/downloads/windows/visualstudio/1.1.html

Can't install SQL Server 2008 R2 management tool (complete)

I have SQL Server 2008 R2 Express installed on my workstation. I’m in the process of learning Entity Framework, and wanted to use the Management Studio Profiler to help understand the SQL commands generated by EF.
Since the Express version does not include the Profiler, I installed SQL Server 2008-R2 Developer side-by-side with Express. The installation went perfectly and I had no problem adding my databases to the full Server installation.
The problem is that Management Studio – Complete was not installed with the full SQL Server so I still don’t have access to the profiler. I re-ran the installer so I could install the Complete version, but it is greyed out and I cannot select it for installation.
Can someone help me get Management Studio – Complete installed?
If I have to uninstall the Express version, will that hurt anything (I have VS2010 Ultimate installed as well)?
Thanks!
I ran into this and had the hardest time getting the Management Tools - Complete to install. I finally got it working by running the upgrade. Even though it was already Enterprise edition with nothing obvious to upgrade I went through the update wizard. After that I was able to do the install of the complete tools.
Steps:
Run the installer -> Maintenance -> Edition Upgrade -> follow the wizard.
Then -> Run the installer -> Installation -> New SQL Server stand-alone ... -> ... "Add features to existing install" -> Management Tools - Complete.
To solve the problem I uninstalled SQL express and the Basic version of Server Management Studio.
Uninstalling SQL Express is not intuitive as it does not appear as a separate item in the “Programs and Features” window.
To uninstall it, I right-clicked on “Microsoft SQL Server 2008 R2 (64-bit)” and selected Uninstall/Change”. This opened a dialog, from which I selected ‘Remove’. I navigated though the process until I arrived at a screen which allowed me to elect to remove the Express version (all items with 'Express' in the name). I also elected to remove Management Studio Basic.
After SQL Server Express and Management Studio Basic were uninstalled, I started the SQL Server 2008 R2 installer; this time I was able to select Management Studio Complete for installation.
The installation process executed normally; when it finished the Complete version of Management Studio was available and I was able to execute the Profiler.
Uninstalling SQL Server Express appears to have done no harm to my system; I was able to modify the Server Explorer data connection in VS2010 to connect to my database in the full version of SQL Explorer.
This process outlined above worked for me; YMMV.
In my case I was trying to install instance features, while SQL Management Studio is a Shared feature.
Another way of installing SQL Management Studio is to install another instance using SQL With Tools or the Advance Services issue. Do not look into another instance that is already installed.

how to install mysql connector to work with visual studio

i already install mysql 5 in my system and visual studio professional. and everybody work fine but how i can connect mysql database in server explore using installing connector
when i download connector for mysql i get the rar. the rar have some code but i not know how it work are anyone tell me what i do to use mysql in my server explorer
Go get Connector / net. It's the dot Net connector software. It comes in .msi form, not .rar form, and opens up Visual Studio to work with mySQL servers. I know for sure that it works with VS2008 and VS2010.
http://dev.mysql.com/downloads/connector/net/

How do I connect to MySQL 5.1 in Visual Studio 2010?

Does any one know how to connect to MySQL 5.1 with Visual Studio 2010?
I have already tried the MySQL Connector/ODBC route and it got me really nasty results. The table rows were all listed as a view in the views section and nothing at all was listed in the tables or procedures folder.
To get the Entity Frame working with VS2010, I had to do the following:
This only worked with Mysql .net Connector v6.3.1 (alpha). Previous versions ignored VS 2010 (click Development Releases)
I had to rename my Framework\v1.1.4322\CONFIG folder. Otherwise the install will fail. Rename it back when finished
(I've blogged about this here)
Update
6.3.2 is in beta and I can confirm this works. (I didn't need to rename the framework folder)
this seems to solve the issue
UPDATED LINK TO LATEST RELEASE THANKS #Christian Payne
Update: looks like there is already a non-beta!!!!
http://www.mysql.com/downloads/connector/net/
As someone else suggests..
http://dev.mysql.com/downloads/mirror.php?id=382641
..fixes the problem.
I had v6.2.3 installed after I had vs2010 installed and the MySQL driver was not shown in the list of the Database Connect dialog. I wrongly assumed I should use the .NET ODBC drivers instead and it caused all sorts of problems. Although I could easily connect to the DB using codebehind, the server explorer wouldn't connect to the DB.
Luckily after uninstalling 6.2.3 and installing 6.3.0 (from the link above) the MySQL driver was added to VS2010, and I was able to connect to the database and see it in my server explorer.
http://bugs.mysql.com/bug.php?id=45122
I was able to get this to work by doing the following:
My Environment:
Development Box -- Win7 64bit,
VS2010 Pro
Deployment Box -- Win2k8 svr with IIS7
running ASP.NET .Net 2.0/3.0/3.5 sp which is
hosted at DiscountAsp.Net (Note:
DiscountAsp.Net does not provide a
MySQL DB when running on a Win2k8
svr, I'm using a MySQL DB that I connect
to elsewhere on the InterWebs)
Steps I took:
Installed MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
Ref'd the .Net 2.0 version of the MySQL assembly in my ASP.NET MVC2 Web project set to target .Net 3.5 (the path for the MySQL assemblies I used was C:\Program Files (x86)\MySQL\MySQL Connector Net 6.3.6\Assemblies\v2.0)
I ref'd all 3 of the MySQL assemblies (MySql.Data.dll, MySql.Data.Entity.dll & MySql.Web.dll)
I marked each of those assemblies as "Copy Local=True" in my project (a.k.a bin deployment)
Added a MySQL DB connection string to my Project (using the MySQL provider)
Added an ADO.NET Entity Data Model to my project in VS2010 using the connections string
VS2010 took about 30 secs to chew thru my MySQL DB schema but then provided me with a beautiful GUI interface to tweak my MVC Models
Used the DB Entities in my MVC controllers
Deployed the app to my hosted server at DiscountAsp.Net
It works like a charm :)
Erm... through code? Or do you mean the server explorer add-in? Have you tried the latest (albeit GPL-ed) connector version for .NET from Mysql themselves? Again, it's GPL-ed so be aware of the consequences of using that for your own software.
Microsoft Visual Studio 2010 Beta 2 is busted for DDEX providers. They are auto promoting a VS 2008 assembly from 9.0 to 10.0 and it fails. The failure has to do with the fact that a .NET 2 assembly cannot load a .NET 4 assembly.
This worked in beta 1, so it is something they broke.
I even went back and tried the reference DDEX provider from the SDK. It won't load in VS 2010 beta 2 either. That tells me they have something that needs to be fixed.
When is the next beta?