Razor Host Factory error

后端 未结 9 1664
心在旅途
心在旅途 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:54

    I resolved this issue by setting System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc Version to 5.2.0.0 and it worked, finally! Why 5.2.0.0? Same version as NuGet Microsoft ASP.NET project.

    So, the line in /Views/Web.Config should be:

    
    

提交回复
热议问题