title: .net Core amd Roslyn CSharpCompilation, The type 'Object' is defined in an assembly that is not referenced
body: <p>I'm trying to port some .net code to the new Core runtime and I'm having a bad time porting some on-the-fly compilation.</p>
  
  <p>To resume, it always asks me for a reference to System.Runtime and mscorlib, but have no clue on how to reference them.</p>
  
  <p>As a side note, I can't reference Framework 4.6 as the project must be published to a Linux machine with .net Core.</p>
  
  <p>This is the minimum code:</p>
  
  <pre><code>        string testClass = @"using System; 
          namespace test{
  
           public class tes
           {
  
             public string unescape(string Text)
            { 
              return Uri.UnescapeDataString(Text);
            } 
  
           }
  
          }";
  
          var compilation = CSharpCompilation.Create(Guid.NewGuid().ToString() + ".dll")
              .WithOptions(new CSharpCompilationOptions(Microsoft.CodeAnalysis.OutputKind.DynamicallyLinkedLibrary))
              .AddReferences(
              MetadataReference.CreateFromFile(typeof(Object).GetTypeInfo().Assembly.Location),
              MetadataReference.CreateFromFile(typeof(Uri).GetTypeInfo().Assembly.Location)
              )
              .AddSyntaxTrees(CSharpSyntaxTree.ParseText(testClass));
  
          var eResult = compilation.Emit("test.dll");
  </code></pre>
  
  <p>It always complains about the need of mscorlib (in this example) and System.Runtime (in my real project).</p>
  
  <p>I'm using the Microsoft.CodeAnalysis.CSharp package version 2.0.0-beta3</p>
  
  <p>Any ideas on how to compile on the fly with Roslyn and .net Core?</p>