Bug 2291 - MonoMac addin should allow extra options to mmp to be passed
Summary: MonoMac addin should allow extra options to mmp to be passed
Status: RESOLVED DUPLICATE of bug 1650
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Mac Add-in ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mikayla Hutchinson [MSFT]
Depends on:
Reported: 2011-12-01 04:08 UTC by Marek Habersack
Modified: 2012-03-16 17:16 UTC (History)
3 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 Marek Habersack 2011-12-01 04:08:16 UTC
MonoDevelop doesn't show all the assemblies that are present in GAC when editing project references. The assemblies I tried to add references to are I18N.dll and I18N.West.dll both of which are both in GAC and in $PREFIX/lib/mono/X.Y/ where X.Y is a profile version.
In order to reference such assemblies one has to use direct assembly file reference, which is suboptimal as those assemblies are part of Mono distribution and one cannot count on their location not to change.
MonoDevelop should show all the "public" assemblies present in the profile directories when editing project references.
Comment 1 Mikayla Hutchinson [MSFT] 2011-12-01 12:20:27 UTC
GAC is for runtime, not compile time.

See http://monodevelop.com/FAQ#I_added_an_assembly_to_the_GAC.2c_why_doesn't_it_appear_in_the_assemblies_list_when_I_try_to_add_a_reference_in_a_MonoDevelop_project.3f and http://msdn.microsoft.com/en-us/library/wkze6zky(v=VS.100).aspx

Why are you trying to add references to those assemblies? They're not part of any framework profile, they're Mono internal implementation details, you should should never need to reference them directly.
Comment 2 Marek Habersack 2011-12-01 13:54:20 UTC
Indeed, GAC is for the runtime but the assemblies in question are also in $prefix/lib/$profile/ and that's a compile time location.

I'm adding the assemblies as reference because I need them in my MonoMac bundle and this is the only way to force mmp to put them there. They are necessary for Ionic.Zip to work. Those assemblies are loaded dynamically by System.Text.Encoding.GetEncoding, so there's no easy way for mmp to know that they are needed. It should probably include them unconditionally for that reason, IMO.
Comment 3 Mikayla Hutchinson [MSFT] 2011-12-01 16:07:20 UTC
That's an mmp bug, we shouldn't be exposing private assemblies to the reference system to work around it. They may be in the framewokr directory but they're not actualy part of the framework profile.

The real fix is for mmp & MonoDevelop.MonoMac to handle the encoding assemblies the same way that MonoTouch does.
Comment 4 Marek Habersack 2011-12-01 16:39:43 UTC
If the assembly is in $prefix/lib/$profile then it is not private, and MD should allow linking against it. If the i18n assemblies are to be private, they should be removed from the profile and just left in GAC.

Sebastien, could you implement in mmp whatever MonoTouch does in this situation?
Comment 5 Sebastien Pouliot 2011-12-01 16:57:49 UTC
No I can't, it would be a waste of time...

Seriously mmp already support this using the -i18n option (just like MonoTouch linker does). 

      --i18n=VALUE           List of i18n assemblies to copy to the output
                               directory, separated by commas (none,all,cjk,

However the MonoMac addin inside MD does not have a similar GUI (like the iPhone Addin has) to let user set the I18N options or even give a way to let the users provide extra arguments to the linker.
Comment 6 Marek Habersack 2011-12-01 17:09:12 UTC
I see, thanks Sebastien!
Comment 7 Jeffrey Stedfast 2012-03-16 17:16:57 UTC

*** This bug has been marked as a duplicate of bug 1650 ***