Bug #61797 Unable to generate an EDMX file in Visual Studio 2010
Submitted: 8 Jul 2011 6:41 Modified: 4 Aug 2011 12:11
Reporter: Lionel Najman Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:6.3.7 (certainly 6.4.3 too) OS:Microsoft Windows (XP fr-FR)
Assigned to: Assigned Account CPU Architecture:Any

[8 Jul 2011 6:41] Lionel Najman
Description:
With connector 6.3.7 I'm unable to generate an edmx file in VS 2010. I'm facing this error when choosing my database connection
 
System.Data.ProviderIncompatibleException: Provider didn't return a ProviderManifestToken string
 Underlying exception: System.FormatException: 'Incorrect input string format' 

Back to 6.3.6 no problem 

I think thant I've found the problem in your source code: it must be linked to my computer culture (french). Indeed you have changed the GetDbProviderManifestToken between 6.3.6 and 6.3.7 versions. Here is the latest version:
 
protected override string GetDbProviderManifestToken(DbConnection connection) 
{ 
// we need the connection option to determine what version of the server 
// we are connected to 
bool shouldClose = false; 
if (connection.State == ConnectionState.Closed) 
{ 
connection.Open(); 
shouldClose = true; 
} 
double version = double.Parse(connection.ServerVersion.Substring(0, 3)); 

if (shouldClose) 
connection.Close(); 

if (version < 5.0) throw new NotSupportedException("Versions of MySQL prior to 5.0 are not currently supported");
 if (version < 5.1) return "5.0"; 
if (version < 5.5) return "5.1"; 
return "5.5"; 
} 

This statement is wrong for me: double version = double.Parse(connection.ServerVersion.Substring(0, 3));
 
I think this doesn't work on a French computer and a French Visual Studio, you have to explicitily define the culture ("en-US" for example) so as 5.5 could be parsed as double (in France 5,5 is valid, not 5.5)
 
So can you correct this version, it is worthless at this time!

As the method source code is the same in 6.4.3 I think the problem is the same with this version

How to repeat:
Use a French VS2010 on a French XP SP3 computer
Add an edmx file in your project and try to add tables from your database
[8 Jul 2011 13:24] Joakim Dahl
I have the same issue in Win 7 Pro. Os installation language was English but I'm using Swedish locale for time/numbers/keyboard and the like. 
Had to revert to 6.3.6 to get it to work again.
[9 Jul 2011 1:57] Hovard Berg
I'm getting the same error, and I'm using norwegian culture. However i tried setting the culture in web.config to:

<globalization requestEncoding="iso-8859-1" responseEncoding="iso-8859-1" culture="en-US" uiCulture="en-US" />

It didn't help much...
[14 Jul 2011 7:18] Lionel Najman
By setting the culture I was thinking about using the double.parse(string, Iformat Provider) method in the connector source code. Specifying the culture in your web.config doesn't help as it's only used in your application, at runtime
[4 Aug 2011 12:11] Julio Casal
This bug is a duplicate of bug #61901.