Bug 46966 - CultureInfo.set_CurrentUICulture throws NotImplementedException
Summary: CultureInfo.set_CurrentUICulture throws NotImplementedException
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: BCL Class Libraries ()
Version: XI 10.2 (iOS 10.1)
Hardware: PC Mac OS
: --- blocker
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-11-14 22:35 UTC by Frank A. Krueger
Modified: 2016-11-16 15:53 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Frank A. Krueger 2016-11-14 22:35:50 UTC
The function CultureInfo.set_CurrentUICulture throws NotImplemented. This is a regression from previous versions and is blocking my app from working. I cannot wrap the call because a library is making the call.

  at System.Globalization.CultureInfo.set_CurrentUICulture (System.Globalization.CultureInfo value) [0x00000] in /Users/builder/data/lanes/3969/44931ae8/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Globalization/CultureInfo.cs:140 
  at Roslyn.Utilities.UICultureUtilities+<>c__DisplayClass6_0`1[T].<WithCurrentUICulture>b__0 (T param) [0x00018] in <7b9a505b7ac84202a440162b6ea09bfd>:0 



=== Xamarin Studio Enterprise ===

Version 6.1.2 (build 44)
Installation UUID: 033a3a98-f63f-44a3-8bd3-bb3b731f3639
Runtime:
	Mono 4.6.2 (mono-4.6.0-branch/08fd525) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406020007

=== NuGet ===

Version: 3.4.3.0

=== Xamarin.Profiler ===

Version: 0.38.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 8.1 (11544)
Build 8B62

=== Xamarin.iOS ===

Version: 10.2.1.5 (Xamarin Enterprise)
Hash: 44931ae
Branch: xcode8.1
Build date: 2016-11-01 20:52:28-0400

=== Xamarin.Android ===

Version: 7.0.0.18 (Xamarin Enterprise)
Android SDK: /Users/fak/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 25.2.2
SDK Platform Tools Version: 24.0.3
SDK Build Tools Version: 24.0.2

Java SDK: /usr
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b23)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b22, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.10.0.113 (Xamarin Enterprise)

=== Xamarin Inspector ===

Version: 0.99.2.0
Hash: 7714719
Branch: master
Build date: 11/11/2016 2:46:27 PM

=== Build Information ===

Release ID: 601020044
Git revision: 0ccfcd52b95305ebd5b7eca0d88c1017035910ae
Build date: 2016-10-28 15:12:43-04
Xamarin addins: a39a869d8a78d87bdc6775f696c13a4cc9024501
Build lane: monodevelop-lion-cycle8

=== Operating System ===

Mac OS X 10.12.1
Darwin muon.local 16.1.0 Darwin Kernel Version 16.1.0
    Thu Oct 13 21:26:57 PDT 2016
    root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Continuous Coding 1.6.3
Addin Maker 1.3.2
Xamarin Inspector 0.99.2.0
Manifest.addin 0.0.0.0
Comment 1 Rolf Bjarne Kvinge [MSFT] 2016-11-15 06:28:50 UTC
With XI 9.8.0.156 the setter doesn't exist:

> AppDelegate.cs(55,36): error CS0200: Property or indexer `System.Globalization.CultureInfo.CurrentUICulture' cannot be assigned to (it is read-only)

With XI 10.0.1.10 I can reproduce the NotImplementedException you report.

However with XI 10.4.0.4 (the current Alpha version), the setter is implemented, so this is fixed already.
Comment 2 Frank A. Krueger 2016-11-16 15:53:08 UTC
Good to hear! Yeah, Roslyn does some really hacky reflection stuff to find the method.