- Issue 7207 - if current culture of the current thread is not set to the invariant...
authorBrayan Khosravian <35541212+BrayanKhosravian@users.noreply.github.com>
Thu, 22 Aug 2019 13:12:34 +0000 (15:12 +0200)
committerRui Marinho <me@ruimarinho.net>
Thu, 22 Aug 2019 13:12:34 +0000 (14:12 +0100)
* - Issue 7207 - if current culture of the current thread is not set to the invariant culture then initializing the app causes a "NUnit.Framework.InconclusiveException" with the exception- message "App did not start for some reason. System.Argument.Exception: 1 is not supported code page. Parameter name: codepage."

* - fixed usings

Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TestPages/TestPages.cs

index 6f54b9a..e8ad6d1 100644 (file)
@@ -217,6 +217,13 @@ namespace Xamarin.Forms.Controls
                        IApp runningApp = null;
                        try
                        {
+                               // Issue 7207 - if current culture of the current thread is not set to the invariant culture
+                               // then initializing the app causes a "NUnit.Framework.InconclusiveException" with the exception-
+                               // message "App did not start for some reason. System.Argument.Exception: 1 is not supported code page.
+                               // Parameter name: codepage."
+                               if(System.Threading.Thread.CurrentThread.CurrentCulture != System.Globalization.CultureInfo.InvariantCulture)
+                                       System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
+
                                runningApp = InitializeApp();
                        }
                        catch (Exception e)