A gentle note to myself – If I suddenly start getting errors from Sitecore of the form:
Exception: System.InvalidOperationException
Message: Error while rendering view: ‘/Views/Common/Layouts/WebLayout.cshtml’ (model: ‘Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc’).
or
Exception: System.Web.HttpCompileException
Message: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\4f078900\f158f9a6\App_Web_weblayout.cshtml.b31435e0.agxyl06t.0.cs(44): error CS0246: The type or namespace name ‘WebViewPage’ could not be found (are you missing a using directive or an assembly reference?)
… check that you’ve not delete the /Views/Web.config file. Again.
I keep causing this when I clear out my Views folder of old, obsolete, or test views.