title: What does the web.config compilation/assemblies element do?
body: <p>I had a problem where, working on a new MVC project, as soon as I added <code>Html.Partial("Name")</code> to my <code>_Layout.cshtml</code> page, ASP.NET would throw this exception on page load:</p>
  
  <blockquote>
    <p>error CS0012: The type 'System.Object' is not in a referenced assembly is defined. Add a reference to the Assembly "System.Runtime, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a" added.</p>
  </blockquote>
  
  <p>The fix is to add this to the <code>web.config</code>, compilation element:</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>
  
  <p>I'd love to know why this fixes the issue.</p>
  
  <p>What's odd is that the new MVC app I'm using has a load of <em>WebForms ASPX</em> pages that work a treat. I've copied a ton of legacy <em>WebForms</em> stuff into this new MVC project, acres of code, and everything works, and without the <code>Html.Partial</code> call, even my MVC view renders.</p>
  
  <p>So what on Earth is going on? What does this config do and why aren't the normal project references and target framework settings enough?</p>