【发布时间】:2014-02-04 04:50:44
【问题描述】:
我已将我的项目从 MVC 4.0 迁移到 MVC 5.1。我已按照此处提到的所有步骤进行操作 http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2
我已经安装了 Vs 2013 SP1。
我的项目编译没有任何问题并按预期运行。但是当我打开任何 .cshtml 文件时,我看到以下错误
The type arguments for method 'System.Web.Mvc.Html.DisplayExtensions.DisplayFor<TModel,TValue>(System.Web.Mvc.HtmlHelper<TModel>,
System.Linq.Expressions.Expression<System.Func<TModel,TValue>>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
我尝试了以下链接,但没有成功。
MVC 5 -> MVC 5.1 Migration. Intellisense issues
mvc 3 to mvc 5 migration razor syntax issue
有什么想法吗?
【问题讨论】:
标签: asp.net-mvc asp.net-mvc-migration asp.net-mvc-5.1