[Mono-list] mcs references MS.Net DLL's by default ?
Sat, 23 Feb 2002 09:08:11 +0000 (GMT)
--- Madhuri Kottamasu <firstname.lastname@example.org> wrote:
> I am trying to compile some C# files using mcs on
> Windows. When I did ildasm on the generated .exe, I
> can see it referencing mscorlib.dll (MS.NET), but not
> the Mono's corlib.dll.
If you look at driver.cs line 584, you'll see that mscorlib is referenced by
default unless you pass the --nostdlib option. MCS uses reflection to load this
assembly, so the path isn't hardcoded anywhere - there's a list of locations
that the VM's loader will look. If you're running it using Microsoft's VM then
it will most likely grab mscorlib from the GAC.
The same option needs to be passed to csc (as /nostdlib) if you want to compile
against the Mono corlib. You should also pass the /noconfig option to avoid
using the default csc response file, which will reference the other Microsoft
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts