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

Miguel de Icaza miguel@ximian.com
07 Dec 2002 15:38:17 -0500


Hello,


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

Miguel.