title: getting runtime error assembly 'System.Runtime' while using CSharpCodeProvider
body: <p>I'm getting runtime error about missing reference.</p>
  
  <blockquote>
    <p>The type 'System.Object' is defined in an assembly that is not
    referenced. You must add a reference to assembly 'System.Runtime,
    Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'</p>
  </blockquote>
  
  <p>I'm using MVC application and used CSharpCodeProvider inside my code.</p>
  
  <p>I do not get any compile error but getting runtime error for <code>compileResult</code> as above why?</p>
  
  <pre><code> CompilerResults results = provider.CompileAssemblyFromSource(parameters, code);
  </code></pre>
  
  <p>I even added <code>assemblies</code> tag in <code>web.cofig</code> like following still same error.any clue why?</p>
  
  <pre><code>  &lt;assemblies&gt;     
      &lt;add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;   
    &lt;/assemblies&gt;
  </code></pre>