[Mono-devel-list] Re: Bug in mcs '/r:' handling

Piers Haken piersh at friskit.com
Mon Apr 7 16:34:50 EDT 2003


> -----Original Message-----
> From: Miguel de Icaza [mailto:miguel at ximian.com] 
> Sent: Monday, April 07, 2003 6:08 AM
> To: mono-devel-list at ximian.com
> Subject: [Mono-devel-list] Re: Bug in mcs '/r:' handling
> 
> 
> Hello,
> 
>         There are 3 assemblies created:
>                 a/a.dll - references no other assemblies
>                 b/b.dll - references a.dll
>                 c.exe - references b.dll
>         
>         In the makefile there are two attempts to build c.exe:
>                 mcs /r:a/a.dll /r:b/b.dll c.cs
>                 mcs /r:b/b.dll /r:a/a.dll c.cs
>         
> I am a bit worried about automatically adding the directories 
> where the assemblies live to the search path.  Would it be 
> enough to do:

I'm not suggesting adding the directories, just the DLLs.

So, in the example above, '/r:b/b.dll' causes mcs to look for 'b/b.dll'.
'b.dll' contains a reference to 'a.dll'. Mcs can't find 'a.dll'
anywhere, so it looks at its command line. The command line tells it
there's an 'a.dll' in 'a/', so it loads that one.

Alternatively, the DLLs passed on the command line might have to take
preference over the search paths. I'm not sure what csc's behavior is, I
can't test it right now...

> 	mcs -lib:a,b -r:a.dll -r:b.dll

This would work in this case, but it wouldn't work correctly if the
following DLLs existed:
	a/a.dll
	a/b.dll
	b/a.dll
	b/b.dll

Piers.



More information about the Mono-devel-list mailing list