I had a problem where, working on a new MVC project, as soon as I added Html.Partial(\"Name\") to my _Layout.cshtml page, ASP.NET would throw this
Html.Partial(\"Name\")
_Layout.cshtml
Visual Studio 2017 MVC.RAZOR fixed by adding this to web app web.config section: here is a snippet of my Web.Config just after system.web node: