Bug 18313 - using satallites dll xamarin-mac
Summary: using satallites dll xamarin-mac
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Other ()
Version: 1.6.27
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 15.6
Assignee: Bugzilla
Depends on:
Reported: 2014-03-12 04:22 UTC by David Lilley
Modified: 2017-09-28 10:26 UTC (History)
7 users (show)

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

Self contained Example (23.80 KB, application/zip)
2014-03-12 04:22 UTC, David Lilley
Self Contained Test With WorkAround (32.64 KB, application/zip)
2017-04-13 13:51 UTC, David Lilley

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 David Lilley 2014-03-12 04:22:17 UTC
Created attachment 6287 [details]
Self contained Example

We have a cross platform application and we are using satalite dll for the locale for IOS and Android and the follow forum posts appears to suggest that it works for xamarin mac.


However I cannot get it to work, it only ever shows me the German locale instead of the English Locale on English PC. The example code getting for locale is following:

Assembly aThisAssembly = Assembly.GetExecutingAssembly();
ResourceManager aTextResource = new ResourceManager("SatalliteLocaleTest.Text", aThisAssembly);
string sText = (string)aTextResource.GetObject("SampleText");
if (sText == null)
   Debug.Assert(false, "Text resource " + "SampleText" + " not found!");

I have tried different .Net profiles etc always shows german when it should show English

Placed this on the forum also
Comment 1 David Lilley 2014-03-21 09:33:24 UTC
I have discovered that Xamarin builds the Satalite but does not put it in the Bundles

So I have copied it to from

bin/debug/en/MySolution.resources.dll to bin/debug/MySolution.app/Contents/Monobundle/en/MySolution.resources.dll

The Satalite was picked up and English locale was displayed.

I have discovered another issue where my CultureInfo was en-DE ( English language in Germany ) and the english satallite assembly was not picked up. Where as en_GB does pick up the language.

I also used following after build scripts to make it work
mkdir -p "${TargetDir}/Wallet 4X.app/Contents/MonoBundle/en"
cp "${TargetDir}/en/Wallet 4X.resources.dll" "${TargetDir}/Wallet 4X.app/Contents/MonoBundle/en/"
Comment 2 Sebastien Pouliot 2017-03-09 01:56:22 UTC
@Tim, IIEC (pr review) you fixed this by sharing code with XI build, right ? Please confirm.
Comment 3 Timothy Risi 2017-04-10 23:13:50 UTC
This does look like the issue I fixed in https://github.com/xamarin/xamarin-macios/commit/48682b27aab0e2bd5e002f3079da37b703c26bf8.  That commit looks to be included in the 15.1 release that went into stable a few days ago.

David, could you confirm whether this is working for you on the current stable branch?
Comment 4 Timothy Risi 2017-04-10 23:29:07 UTC
Just realized the original bug report was over 3 years ago.  I'm going to go ahead and close this as resolved (as it should be fixed by the above commit).  Feel free to re-open the bug if you're still seeing issues.
Comment 5 David Lilley 2017-04-13 13:09:54 UTC
Just Tested the Self Contained test and it still seems to be coping to dll to output directory and not the app it self.
Comment 6 David Lilley 2017-04-13 13:48:29 UTC
Actually there is bug in the Self Contained Test, not that it is reaching this point at the moment but the resource id should be SatalliteLocaleTest.Text.en.resources. (My apologies)

It is still not working as above, the Self Contained test shows it copies the dll to the output directory but not the app it self.

I will attach another self contained test with work around with custom commands to copy  the dll in to correct position. To show it working. the Default satellite is German and adds English.

So on a English mac it should read English
on a German mac it should read German
on a Spanish mac it should read German

Custom Commands in 
mkdir -p "${TargetDir}/SatalliteLocaleTest.app/Contents/MonoBundle/en"
cp "${TargetDir}/en/SatalliteLocaleTest.resources.dll" "${TargetDir}/SatalliteLocaleTest.app/Contents/MonoBundle/en/"
Comment 7 David Lilley 2017-04-13 13:51:59 UTC
Created attachment 21509 [details]
Self Contained Test With WorkAround

The Self Contained Test With WorkAround has the workaround in the debug custom commands, where it copies the satalite dll in the to app file it self.
Comment 8 Chris Hardy [MSFT] 2017-09-21 14:55:40 UTC
Moving out to 15.6 as the target milestone as there is a workaround available
Comment 9 Chris Hamons 2017-09-22 21:27:53 UTC
This appears to work for Xamarin.Mac Modern, Full, and Console applications with msbuild.

I believe it is a bug w\ the classic build system, not something we are going to be on our roadmap to fix.