[Mono-list] using gmcs and C# 3.0 features without requiring System.Core.dll

Dan Shryock dan.shryock at gmail.com
Fri Sep 5 15:45:19 EDT 2008

On Fri, Sep 5, 2008 at 12:20 AM, Raja R Harinath <harinath at hurrynot.org> wrote:
>> My real question is how do I stop gmcs from adding references to
>> System.Core.dll, and instead use my implementations of those types?
> The correct answer is '-noconfig' :-)

Apparently I should have payed closer attention to the output of --help :D
"-noconfig[+|-]     Disables implicit references to assemblies"

I just recompiled with this flag, and it worked perfectly.

I had to add a few references manually (System.dll, and
System.Xml.dll), and I received one warning telling me that I didn't
need my own definition of Action<T> as it was already present in the
2.0 mscorlib.dll.

Now that I have resolved those few changes, everything compiles
perfectly, with no warnings about duplicated types, and has no
reference to System.Core.dll as verified by using .NET reflector.

> I guess we could do the ExtensionAttribute check on an assembly only if
> it references System.Core, and remove this stanza.  Patches welcome, I
> guess ;-)

I'd love to help, but unfortunately I don't have time at the moment,
and I'm not using any libraries that reference System.Core.dll so I am
unaffected :(

Thanks for the help!


More information about the Mono-list mailing list