Bug #61933 Input string was not in a correct format - System.Data.Common.DbProviderServices
Submitted: 20 Jul 2011 20:08 Modified: 4 Aug 2011 12:09
Reporter: Francis noel Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:6.4.3.0 OS:Novell NetWare (Windows 7 64)
Assigned to: Assigned Account CPU Architecture:Any

[20 Jul 2011 20:08] Francis noel
Description:
[FormatException: Input string was not in a correct format.]
   System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) +9416635
   System.Double.Parse(String s) +23
   MySql.Data.MySqlClient.MySqlProviderServices.GetDbProviderManifestToken(DbConnection connection) +125
   System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +34

[ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.]
   System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +163
   System.Data.Entity.ModelConfiguration.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) +35
   System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) +159
   System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +50
   System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input) +117
   System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +423
   System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +17
   System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +63
   System.Data.Entity.Internal.Linq.InternalSet`1.GetEnumerator() +15
   System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator() +40
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +315
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +58

How to repeat:
Create entity framework code-first project with computer canada English.

Suggested fix:
File : \Source\MySql.Data.Entity\ProviderServices.cs
Line : 188

  double version = 5.0;
             culture = CultureInfo.InvariantCulture;
             try
             {
               version= Double.Parse(connection.ServerVersion.Substring(0, 3),CultureInfo.InvariantCulture);
             }

             catch (FormatException e) { 
             
             }
[25 Jul 2011 13:45] Sergey Balan
Confirmed. I looked for solution for several hours and this report helped me

I worked in ru-RU windows locale, and Connector throws this error

I switched regional settings on en-US and this resolved this issue

This should be defenately fixed.
User shouldn't change his locale to resolve this issue
[3 Aug 2011 10:22] Torbjørn Pedersen
Suggested solution described here:
http://stackoverflow.com/questions/6899617/how-do-i-set-the-absolute-path-for-a-assembly-c...
[4 Aug 2011 12:09] Julio Casal
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

This bug is a duplicate of bug #61901.

Thank you for your interest in MySQL.