Bug 45279 - mono_main overwrites any dirs set with mono_set_dirs before hand
Summary: mono_main overwrites any dirs set with mono_set_dirs before hand
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: 4.8.0 (C9)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-10-11 15:41 UTC by Chris Hamons
Modified: 2016-10-11 15:41 UTC (History)
2 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 for Bug 45279 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Chris Hamons 2016-10-11 15:41:21 UTC
In this code:


We call set_dir during Xamarin.Mac application launch:

frame #0: RemotingTest`mono_set_dirs()
frame #1: RemotingTest`app_initialize()
frame #2: RemotingTest`::xamarin_main()
frame #3: RemotingTest`main()

and then invoke mono_main which overwrites are requested dirs:

frame #0: RemotingTest`fallback [inlined] mono_set_dirs(assembly_dir="/Users/donblas/Programming/macios/master/xamarin-macios/builds/install/mac64/lib", config_dir="/Users/donblas/Programming/macios/master/xamarin-macios/builds/install/mac64/etc") at assembly.c:588 [opt]
frame #1: RemotingTest`fallback + 23
frame #2: RemotingTest`mono_set_rootdir
frame #3: RemotingTest`mono_main() 
frame #4: RemotingTest`::xamarin_main()
frame #5: RemotingTest`main()

This appears to be a bug in the embedding API?

Worked around in XM with https://github.com/xamarin/xamarin-macios/pull/971