[Mono-list] Using mcs in a C# program

Martin Baulig martin@gnome.org
08 Dec 2002 14:23:15 +0100


Miguel de Icaza <miguel@ximian.com> writes:

> > Well, we may want to split mcs into mcs.exe and mcs-compiler.dll and then integrate it in
> > some way with System.CodeDom.Compiler.  Once we can execute dynamic assemblies, this could
> > also return an Assembly on which you could just call Run().
> > 
> > However, this may involve some larger modifications in mcs since we're using global
> > variables in some places for performance reasons.
> 
> Well, it can be solved using a different AppDomain per compilation, but
> for now, we can just do what Microsoft does, which is to fork the
> compiler, and get the output back.
> 
> Although it would be nice to make the compiler a library, I have yet to
> see a good reason (by good I mean, the reason is bigger than the pain to
> make the changes and maintain those).

Well, I think it doesn't make much sense to make the compiler a library until we can
actually execute dynamic assemblies, ie. without writing it to disk at all.

-- 
Martin Baulig
martin@gnome.org
martin@ximian.com