I get a MvcWebRazorHostFactory error trying to run my app, but it\'s not an MVC app at all. I have the following web packages installed via nuget:
Microsoft
I started getting this error in my Razor .cshtml pages in an MVC project following some NuGet package management / upgrading.
I didn't want to remove the Web.config file completely from the Views folder because I had customised it width some elements. But I noticed that the Version=... in the didn't match my version of System.Web.Mvc (checked version in Object Browser).
Altering this version number to match that of my System.Web.Mvc assembly, and restarting Visual Studio, fixed the problem for me (as suggested by Daniel)