title: Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()'
body: <p>Update: same for mvc 4 to mvc 5.</p>
  
  <p>I started a new mvc 4 project and migrated an mvc 3 project in it (controllers/models/scripts etc). While everything compiles now i get the following error:</p>
  
  <blockquote>
    <p>Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()' to access security critical method 'System.Web.WebPages.Razor.WebPageRazorHost.AddGlobalImport(System.String)' failed.</p>
  </blockquote>
  
  <p>I can't find anything on the web with this error. The error hits before getting into the application start.</p>
  
  <p>I tried reinstalling all assemblies with nuget, putting a 'clean' web.config to no avail.</p>
  
  <p><strong>Anyone had this problem before?</strong></p>