[Mono-list] Specifying assemblies on mcs command line

Jonathan Pryor jonpryor@vt.edu
14 Jun 2002 07:17:33 -0400


Comments Inline.

On Fri, 2002-06-14 at 06:46, Paolo Molaro wrote:
<snip>

    My proposal is to change mcs to not add the dll extension if LoadFrom()
    fails (or at least to add it only if it's not there already). This way
    we could document better the behaviour of the -r and -L options.
    
I disagree, slightly.  On .NET, I have noticed on occasion that a
"Fusion Log" is printed to the console when I attempted to load an
Assembly at runtime and it failed.  The fusion log usually lists both
the name I passed to the Load/LoadFrom method, and my provided name with
".dll" appended.

I believe that the .NET documentation lists (somewhere) the locations
and names searched for when looking for Assemblies.  Alas, I'm not able
to look up the documentation right now, but if you search for Assembly
Loading (and related), you should find it.

So, I think we need to search for *both* the assembly with the specified
name, plus the assembly file with ".dll" appended.

    -r takes either an assembly name or a filename. If given an assembly
    name, the runtime tries to load the assembly from the runtime-specific
    search paths (default path + MONO_PATH with the mono runtime, dunno what
    the ms runtime uses). If given a filename, mcs tries to load the
    assembly in the current directory and in the directories specified with
    the -L option.

IIRC, `csc' also behaves this way with its `/r' argument.
    
    How does that sound?
    
Sounds good, but we should look up Assembly loading in the .NET
documentation and try to stay compatible with what's documented.

    lupus

    -- 
    -----------------------------------------------------------------
    lupus@debian.org                                     debian/rules
    lupus@ximian.com                             Monkeys do it better
    

 - Jon