类型或命名空间名称' MaxLengthAttributeAdapter'无法找到

时间:2014-06-09 16:22:38

标签: asp.net-mvc data-annotations

我创建了自定义数据注释属性,并尝试在global.asax中注册&#em; em 但面临问题:类型或命名空间名称' MaxLengthAttributeAdapter'无法找到 MaxLengthAttributeAdapter

有人知道什么是错的吗? 提前谢谢!

[UPD] 添加了命名空间:

namespace

也添加了引用:

references

1 个答案:

答案 0 :(得分:0)

在Global.asax中注册它并不否定在代码的其他引用它的区域中添加引用的必要性。将正确的using Namespace.To.MaxLengthAttributeAdapter;行添加到抱怨的.cs文件中。