Viewbag.Title error: One or more types required to compile a dynamic expression cannot be found. Are you missing a reference?

前端 未结 5 1656
生来不讨喜
生来不讨喜 2021-02-14 01:03

I have an ASP.NET MVC 5 web application. In every .cshtml view file i get the following error for Viewbag: One or more types required to compile a dynamic expre

5条回答
  •  借酒劲吻你
    2021-02-14 01:58

    I do not have this problem when running VS 2012 as administrator.

    Otherwise, what worked for me:

    1. in root web config have added as recommended reference to correct assembly as child of compilation node </assemblies></compilation> </system.web>

    2. set copy local = true properties for System.Core and Microsoft.CSharp

提交回复
热议问题