Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 15092 [details]
With the linker turned to an option other than "Don't Link" and the culture set to "ar-SA" (Arabic, Saudi Arabia), calling ToString() on a DateTime object or trying to format one causes an exception:
System.ArgumentOutOfRangeException: Not a valid calendar for the given culture.
To reproduce, build the attached reproduction case and deploy. Tap the "Change CurrentCulture to ar-SA" button and then tap one or both of the other two buttons to see exceptions.
Then change the linker options to "Don't Link" and try again. Then, behavior is as expected, there are no exceptions.
In this instance, this is the correct intended behavior of the linker to allow minimizing the size of the app by omitting internationalizations that are not used. The developer must use the project options to select the desired internationalizations to include.
### Xamarin Studio
Enable "Project Options -> iOS Build -> Internationalization [heading] -> mideast [checkbox]"
### Visual Studio
Enable "Project Properties -> iOS Build -> Advanced [tab] -> Internationalization [heading] -> mideast [checkbox]"
(As a caution, in the current version of Xamarin for Visual Studio you will need to watch out for Bug 29323 which can unfortunately cause this setting to get unchecked "automatically.")
(I verified briefly that this properly solved the problem in the attached test case from Comment 0. I tested both Xamarin Studio on Mac and Visual Studio on Windows using the current Stable versions of Xamarin.)
Thanks for the info, Brendan.