System.Web.Mvc.HtmlHelper does not contain a definition for RenderPartial

This error happens because while Mvc is loaded, the Html extensions are not. This can be fixed by adding a namespace entry under the pages section in your Web.config:

<pages …>
  …
  <namespaces>
    …
    <add namespace="System.Web.Mvc.Html" />
  </namespaces>
  …
</pages>