我目前正在开发Aspnet MVC Web应用程序。我正在使用.NET Framework 4.6.1和Microsoft.AspNet.Mvc v5.2.6。
我将Kendo.Mvc v2018.3.911.545添加到我的项目中,并开始使用Grid Kendo。起初根本没有问题。经过一段时间后,我突然出现以下错误:
类型'Expression <>'是在未引用的程序集中定义的。您必须添加对程序集'System.Core,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089
的引用
我尝试了这些链接,但没有一个对我有用:
The type 'Expression<>' is defined in an assembly that is not referenced
Compilation error in .NET 4.0 web.config - Linq not found
bogus intellisense error putting red squiggles all over razor views!!
VS 2015 IntelliSense: Assembly Not Referenced Error
此外,我不想将Microsoft.Aspnet.Mvc降级到v.5.2.0,因为此操作在Kendo UI和剃须刀页面上产生了新问题。
此外,我尝试将.NET Framework升级到4.7.1,然后降级到4.5,但仍然没有用。我也不是很想降级.NET Framework,因为虽然它不能解决我的问题,但它还会生成新的。