title: C# Compiler-as-a-Service: Mono.CSharp vs Microsoft.CSharp
body: <p>I am looking to replace certain reflection-based parts of our code with ones that perform better using dynamic runtime compilation. Looking around I saw that both Mono and Microsoft have separate Compiler-as-a-Service solutions: <code>Mono.CSharp</code> and <code>Microsoft.CSharp</code>.</p>
  
  <p>With the risk of asking an opinion-based question, I'm wondering how these two compare?</p>
  
  <p>As far as I can tell from a very superficial initial investigation, they both generally provide CAAS capabilities. I was able to compile a "Hello World" class using Microsoft.CSharp and execute it. And although I didn't do the same thing with the Mono one yet, I'm assuming it could do the same.</p>
  
  <p>Does anyone have any experience with either or both and can comment on the issue?</p>
  
  <hr>
  
  <p><strong>Edit:</strong> I am not asking about a comparison of Mono's C# and Microsoft's C# - we are already familiar with and using both. The question is specifically about the two <strong>CAAS</strong> (<em>Compiler-as-a-Service</em>) solutions.</p>
  
  <p><strong>CAAS</strong> isn't (yet anyway) a standard part of the .NET runtime, i.e there is no <code>System.Compile</code> namespace yet. The two solutions <code>Mono.CSharp</code> and <code>Microsoft.CSharp</code> are separate non-standard CAAS solutions for C#. Their interfaces are very different and hence the question.</p>
  
  <p><a href="http://docs.go-mono.com/index.aspx?link=N%3AMono.CSharp" rel="nofollow noreferrer">Mono's compiler service</a></p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/microsoft.csharp.aspx" rel="nofollow noreferrer">Microsoft's compiler service</a></p>
  
  <hr>
  
  <p><strong>Edit #2:</strong> Completely forgot about <a href="http://msdn.microsoft.com/en-us/vstudio/hh500769.aspx#Toc306015663" rel="nofollow noreferrer">Roslyn</a> (thanks to <a href="https://stackoverflow.com/users/11182/lex-li">@Lex Li</a>)</p>