找不到类型或名称空间名称"IClientValidatable" [英] The type or namespace name 'IClientValidatable' could not be found
问题描述
我使用以下链接在asp.net MVC应用程序中创建了一个自定义属性:
I have created a custom attribute in my asp.net MVC application using the following link:
错误52找不到类型或名称空间名称'IClientValidatable'(您是否缺少using指令或程序集引用?)
错误53找不到类型或名称空间名称'ModelClientValidationRule'(您是否缺少using指令或程序集引用?)
错误54找不到类型或名称空间名称'ModelMetadata'(您是否缺少using指令或程序集引用?)
错误55找不到类型或名称空间名称'ControllerContext'(您是否缺少using指令或程序集引用?)
Error 52 The type or namespace name 'IClientValidatable' could not be found (are you missing a using directive or an assembly reference?)
Error 53 The type or namespace name 'ModelClientValidationRule' could not be found (are you missing a using directive or an assembly reference?)
Error 54 The type or namespace name 'ModelMetadata' could not be found (are you missing a using directive or an assembly reference?)
Error 55 The type or namespace name 'ControllerContext' could not be found (are you missing a using directive or an assembly reference?)
我正在使用asp.net MVC 4 Beta.
I am using asp.net MVC 4 beta.
我试图将asp.net.MVC的引用添加到项目中,但是在添加引用对话框中不可用.
I tried to add reference of asp.net.MVC to the project but it is not available in add reference dialogue.
请建议如何解决
推荐答案
确保已将using System.Web.Mvc;
添加到文件顶部,该文件是定义此类的名称空间.
Make sure you have added using System.Web.Mvc;
to the top of your file which is the namespace in which this class is defined.
这篇关于找不到类型或名称空间名称"IClientValidatable"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!