Bug 7543 - Get Encoding fails when I build Monodroid project with unshared runtime
Summary: Get Encoding fails when I build Monodroid project with unshared runtime
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.2.x
Hardware: PC Windows
: Highest normal
Target Milestone: 4.8 (async)
Assignee: Radek Doulik
Depends on:
Reported: 2012-09-28 18:50 UTC by Branden Barber
Modified: 2013-07-08 10:07 UTC (History)
4 users (show)

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:

Description Branden Barber 2012-09-28 18:50:25 UTC
I was faced with these two exceptions when using System.Text.Encoding.GetEncoding for IBM437:
System.ArgumentException: Encoding name 'IBM437' not supported
System.NotSupportedException: CodePage 437 not supported

Even when adding the "West" encoding, the I18N and I18N.West dlls are not getting copied to the .apk's assemblies folder. The specific encoding I'm needing to use is "IBM437". 

I found another user that is having the same exact problem:

I was able to work around this issue by adding the 2 dlls manually


Comment 1 jesse.attas 2013-05-10 18:07:13 UTC
I am seeing the same NotSupportedException. For me the issue only happens when I turn on Link All Assemblies. I have tried adding Il8N and Il8N.West as references from my project and added them to the list of "Skip linking assemblies", but I still see this exception.

Any idea whether this bug will soon be fixed or if there are other workarounds to try?
Comment 2 jesse.attas 2013-05-24 11:37:09 UTC
It turns out that I had used the wrong name when adding those assemblies to the "Skip linking" list (I incorrectly included a .dll extension). When I added them with the correct name, the workaround worked. But it would still be nice not to have to do this workaround!
Comment 4 Radek Doulik 2013-06-30 11:58:37 UTC
I have tried with 4.7.10 and it works OK. I suppose it was fixed meanwhile. It works for me even with Linking enabled.

If it still doesn't work for you then please attach test project so that I can replicate and fix.
Comment 5 Atin 2013-07-08 10:07:03 UTC
Today, We have checked this issue with following builds:

Windows 7
VS 2010/2012
XS 4.0.9(build 15)
MFA 4.7.11028

We are able to successfully build and run the MFA template with unshared runtime option without any exception. Hence marking this as Verified fixed.