Razor Host Factory error

后端 未结 9 1683
心在旅途
心在旅途 2020-12-25 12:00

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         


        
9条回答
  •  误落风尘
    2020-12-25 12:49

    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)

提交回复
热议问题