I had created mvc4 based app using vs2012 Framework 4.5
Upgraded the app to MVC5.
now it fails with:
Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()' to access security critical method 'System.Web.WebPages.Razor.WebPageRazorHost.AddGlobalImport(System.String)' failed
How to resolve this?