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

Daniel Morgan danmorg@sc.rr.com
Sat, 7 Dec 2002 09:12:29 -0500


Hi,

How do you use mcs (the Mono C# compiler) from a C# program?  I'm looking
for something that will work on Linux and Windows.

Let's say, in my C# program, I want to compile another C# program using mcs?

1. Would I need to spawn another process to do that?  If so, how in C#?
2. Use the Reflection.Emit API.  I don't want to do this because there are
so many details
   I don't care about that can be handled just fine by mcs.
3. Use some API that can load mcs as an object in my C# program so I can
build assemblies
   easily.

Thanks,
Daniel