asp.net – 使用MvcBuildViews构建Razor = true失败
发布时间:2020-12-16 07:45:15 所属栏目:asp.Net 来源:网络整理
导读:我有一个使用MvcContrib和MvcScaffold构建的新项目.动态编译一切正常.但是,当我在项目文件中打开视图编译时,编译会中断. The name 'model' does not exist in the current context'System.Web.WebPages.Html.HtmlHelper' does not contain a definition for
我有一个使用MvcContrib和MvcScaffold构建的新项目.动态编译一切正常.但是,当我在项目文件中打开视图编译时,编译会中断.
The name 'model' does not exist in the current context 'System.Web.WebPages.Html.HtmlHelper' does not contain a definition for 'LabelFor' and no extension method 'LabelFor' accepting a first argument of type 'System.Web.WebPages.Html.HtmlHelper' could be found (are you missing a using directive or an assembly reference?) 'System.Web.WebPages.Html.HtmlHelper' does not contain a definition for 'EditorFor' and no extension method 'EditorFor' accepting a first argument of type 'System.Web.WebPages.Html.HtmlHelper' could be found (are you missing a using directive or an assembly reference?) 'System.Web.WebPages.Html.HtmlHelper' does not contain a definition for 'ValidationMessageFor' and no extension method 'ValidationMessageFor' accepting a first argument of type 'System.Web.WebPages.Html.HtmlHelper' could be found (are you missing a using directive or an assembly reference?) 如果你是left out the web.config file from the Views folder,那就是你会收到同样的错误,但那就是现在.我已经有了Phil Haack’s fix,但无济于事.为什么MSBuild没有找到MVC3好东西? 解决方法
我发现我在配置文件中意外复制了system.web部分,导致了同样的错误.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- Asp.Net Web API和WCF服务有什么区别?
- asp.net-mvc-3 – ASP.NET MVC 3书籍计划
- asp.net-mvc – 从部分视图添加html头标记的脚本引用
- asp.net – 解决.net Web应用程序中的可伸缩性和性能问题
- 在我的应用程序中托管ASP.NET
- ASP.NET中的Application和Cache有什么区别?
- asp.net-mvc – 使用jQuery ASP.NET MVC自动保存表单输入
- 显示在文本框,标签后面的菜单. ASP.NET/C#
- asp.net-mvc – 洋葱建筑 – 存储库与服务?
- 从ASP.Net Web服务json输出中删除“d”对象
推荐文章
站长推荐
热点阅读