Bug #23071 Add Connection Dialog of server explorer closes instantly when text is typed.
Submitted: 7 Oct 2006 13:51 Modified: 14 Dec 2006 15:40
Reporter: Robert Blenkinsopp
Status: Closed
Category:MySQL Visual Studio Plugin Severity:S1 (Critical)
Version:1.07 OS:Microsoft Windows (Windows XP Professional SP2 OEM)
Assigned to: Target Version:
Tags: Visual Studio, .net, MySQL Tools

[7 Oct 2006 13:51] Robert Blenkinsopp
Description:
When adding a new connection via the server explorer, the dialog appears correctly
however the instance text is typed or pasted into one of the text boxes, the dialog
closes, sometimes causing visual studio itself to spontaneously close.

This is occuring on multiple tested computers each installed with Visual Studio.net 2005
Professional Edition. This issue also occurs afrer a fresh install and multiple install
attempts..

There is a MySQL 5.0 server running on the same machine and other mysql tools are also
installed.

No error is shown/displayed.

How to repeat:
1. Open Server Explorer
2. Right Click Dataconnections and Click "Add Connection..."
3. In the dialog that appears select "MySQL Database"
4. Click "Continue"
5. In the "Add Connection" Dialog that appears, typing or pasting any text in any text
box with make the dialog close and sometimes visual studio.

Suggested fix:
No Idea, - Look for a bug.
[7 Oct 2006 14:09] Valeriy Kravchuk
Thank you for a problem report. What exact version of Connector/Net is used?
[8 Oct 2006 8:50] Lars Nikolajsen
I have the exact same problem. I'm using the .Net connector version 1.0.7.30072
[8 Oct 2006 11:17] Robert Blenkinsopp
hi,

My Version of Connecter/Net is 1.07 (Current on the downloads page)

My appologies, This is an issue with not usingt Connecter/Net 5.01 with Visual Studio
Tools for MySQL. However this does highlight the fact that visual studio should give a
meaningful error message and not completely close when this version of connector is not
found.
[9 Oct 2006 17:30] Reggie Burnett
Robert

You are right.  I've made a note to have the plugin installer check to make sure the
appropriate version of Connector/Net is installed.
[9 Oct 2006 17:35] Puiu Hrenciuc
I can confirm this bug. I also would like to add that this has nothing to 
do with Connetctor/.NET, but with MySQL Tools for VS 1.0.1 Beta. I have also
downloaded it, installed it and in VS.NET 2005, in Server Explorer, when
I am trying to create a MySQL connection it crashes without any error in 
the Server Explorer/Data Connections/Add Connection.../Choose Data Source (MySQL )/Add
Connection dialog. It only crashes when you press a key ( for eg.
to write Server Name or User Name or whatever ) ...

Versions :

Windows XP SP 2 5.1.2600
VS.Net 2005 Pro 8.0.50727.51 (QFE.050727-5100)
.NET Framework 2.0.50727
MySQL Tools for VS 1.0.1-Beta
[9 Oct 2006 17:38] Puiu Hrenciuc
I forgot to tell that I have Connector/.NET 5.0.1 Beta installed.
[9 Oct 2006 17:48] Robert Blenkinsopp
That is interesting as I have encountered no further errors since I upgraded to
Connector/Net 5.01, However I still also have Connector/NET 1.07 installed side by side.
[9 Oct 2006 17:54] Puiu Hrenciuc
I never had Connector/.NET 1.0.7 or prior installed.
[9 Oct 2006 18:02] Reggie Burnett
Puiu

Did you follow the instructions in the release announcement?  Connector/Net 5.0.1 has a
flaw in its installer that causes this problem with the plugin.  We included instructios
in the release announcement for plugin 1.0.1 beta on how to fix this.  Please review
those steps and let us know if you have any questions.
[9 Oct 2006 18:25] Puiu Hrenciuc
Reggie,

Wierdly there was no such entry in machine.config, 
I have added 			
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net
Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory,
MySql.Data,Version=5.0.1.0, Culture=neutral,PublicKeyToken=c5687fc88969c44d"/>

in the 
<system.data><DbProviderFactories> section

and it works just fine.

Thanks for you support,
Puiu
[9 Oct 2006 18:45] Robert Blenkinsopp
Puiu, are you sure your were using Connector/Net 5.01? Its just that 5.00 is know to not
modifiy the machine.config file to add the provider.
[9 Oct 2006 18:48] Puiu Hrenciuc
The downloaded file name is : mysql-connector-net-5.0.1-beta.zip
You decide its version :)
[9 Oct 2006 19:00] Robert Blenkinsopp
Fair enough :)
[10 Oct 2006 1:55] Robert Blenkinsopp
This problem has now reoccured, with no changes made to my configuration. 

It would appear that something has happened to the data provider as visual studio is now
throwing the error:

"Failed to find or load the registered .Net Framework Data Provider." 

when trying to modify exisiting connections.
[25 Oct 2006 23:48] Jim Arthur
This bug appears to be the result of not modify the machine.config file based upon the
blog post found on this site with the announcement of the release of product. I do not
have the site -- just encountered the same issue and fixed it with change to
machine.config. Created a new bug though . . .
[28 Oct 2006 10:58] Thanassis Couloussias
Robert,
Could you please clarify what exactly to do in order to overcome this problem?
After a whole-morning struggle I only resulted in having installed
connector/Net versions 1.0.7, 1.0.8, 5.0.1 and still that damn (sorry!) thing
is not working...

Thanx in advance.
Thanassis Couloussias
[28 Oct 2006 12:20] Robert Blenkinsopp
Hi, 

Sorry for the delay in responding, the email account my MySQL accoutn is tied to is
experiancing difficulties.

For a while I was back in the same boat as everybody else as my installed decided to
randomly stop working again without any changes made. However I have fixed it again by
unistalling all MySQL/Connector and VS.net Plugin for MySQL installs and I have then
reinstalled just Connector/.NET 5.01 and MySQL Tools for visual studio 1.01.

However this still does not work due to the error in the machine.config file:

the line in the dbproviders section:

<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient"
description=".Net Framework Data Provider for MySQL"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data"/>

Should read (thanks Puiu):

<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient"
description=".Net Framework Data Provider for MySQL"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,Version=5.0.1.0,
Culture=neutral,PublicKeyToken=c5687fc88969c44d"/>

Once this change was made everything seamed to work again.

So far I have not experianced anymore problems.
[28 Oct 2006 12:53] Thanassis Couloussias
Hi Robert,

Thank you very much. Yes, it did work! Even though I uninstalled nothing (yet!)!
[27 Nov 2006 20:39] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/15882
[10 Dec 2006 21:04] Robin Wheeler
I have the same problem with 5.0.2 of the connector, and my machine.config file is correct
according to the comment above.
[10 Dec 2006 21:26] Robin Wheeler
I notice in the patch description above that the fix is simply to check if connector 5.0.2
is installed. So I assume this problem is supposed to be fixed in 5.0.2. I'm still seeing
the same symptom in 5.0.2, so does anyone have any idea what other issus may cause this
prob?
[14 Dec 2006 15:40] MC Brown
Notes have been added to the Connector/NET and Visual Studio plugins.
[1 Sep 2007 18:37] Ivan Flaendsdal
I have this problem. 

I have install versin 5.1.2 on a Vista machine...

B.R.

Ivan Flaendsdal
[1 Sep 2007 18:37] Ivan Flaendsdal
I have this problem. 

I have install versin 5.1.2 on a Vista machine...

B.R.

Ivan Flaendsdal
[24 Jul 2008 8:37] Tonci Grgin
New report: Bug#38327.