Hi,

"Dan Shryock" <[EMAIL PROTECTED]> writes:

> I'm working on a project which is using some C# 3.0 features, but I am
> hoping to target the .NET 2.0 runtime on windows.
>
>>From what I have read[1] I should be able to add my own
> implementations of the few types I need.
>
> 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' :-)

However, it doesn't always work, as seen in this stanza in mcs/driver.cs:

        if (!load_default_config){
                //
                // Yet another SRE related problem, we have to always load 
System.Core
                // even with -noconfig, otherwise the check for 
ExtensionAttribute in
                // loaded assemblies won't work
                //
                if (need_system_core && references.Count != 0 && 
Driver.OutputFile != "System.Core.dll")
                        soft_references.Add ("System.Core");
                
                return;
        }

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 ;-)

- Hari

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to