The type 'Expression<>' is defined in an assembly that is not referenced

前端 未结 28 1615
渐次进展
渐次进展 2020-12-24 04:39

In ASP.NET MVC 4.5.2 Framework.

after typing

@Html.LabelFor()
or 
@Html.EditorFor()

in view

I\'m getting Error: The

28条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-24 05:09

    Add the System.Core.dll file to the bin folder manually. Restart VS and build project. Solved for me

    Had design errors in all views on @Html helpers and on my Kendo grids.

    Adding System.Core assembly in Web.config did nothing, nor did downgrading the MVC version. And error when trying to add reference to System.Core manually:

    A reference to 'System.Core' could not be added. This component is already automatically referenced by the build system.

    Make sure to check that TargetFramework in project properties matches the one in project web.config.

    Screenshot of bin folder

提交回复
热议问题