[Mono-devel-list] locating dlls in the compiler

Michal Moskal malekith at pld-linux.org
Tue May 4 07:31:02 EDT 2004

How do I find where /usr/lib/mono/1.0 is?

I mean mcs.exe looks for directory it is lunched for and assumes that
there are symlinks to framework assemblies. Now this is no option for me
in my compiler. Under Microsoft runtime I can simply check for CodeBase
of mscorlib or System.dll, that are already loaded. However under mono it
is /usr/lib and gac location (with pubtoken etc). Neither is good for me.

Now I have a few options:

  1) resolve references using LoadWithPartialName()
  2) put ncc.exe in /usr/lib/mono/1.0
  3) compile in somehow /usr/lib/mono/1.0
  4) require user to provide this path on each compilation

Now 1) will be just an option, since it can cause problems when multiple
libraries are installed. 2) doesn't seem any good. 3) will break binary
distribution and is ugly. 4) ... I don't even want to think about it.

Maybe CodeBase of System.dll could be used to return proper directory, 
it works somehow under MS.

: Michal Moskal :: http://www.kernel.pl/~malekith :: GCS !tv h e>+++ b++
: When in doubt, use brute force. -- Ken Thompson :: UL++++$ C++ E--- a?

More information about the Mono-devel-list mailing list