[Mono-list] forcing csc to use local definitions

Jaak Simm jaaksimm@firm.ee
Wed, 08 May 2002 13:57:40 +0200


Hi mono-list,

I'm stubbing out some classes and have a small problem when compiling
them. Namely, I need to use my own (that is mono) definitions of
mscorlib classes instead of the original ones. Compiler by MS (csc),
however, uses its own base corlib by default:
> ControlBindingsCollection.cs(24,43): warning CS1595:
>        'System.Windows.Forms.BindingsCollection' is defined in
multiple places;
>        using definition from
>
'C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll'

I also tried using /nostdlib and putting the dll into /references
instead:
> csc /r:TODOAttribute.dll,BindingsCollection.dll,mscorlib.dll /nostdlib
/t:library ControlBindingsCollection.cs
but mscorlib.dll still has priority over BindingsCollection.dll. And
removing mscorlib.dll is not an option as it contains some vital
classes.

Regards,
Jaak