繁体   English   中英

System.ComponentModel.DataAnnotations命名空间不存在

[英]the System.ComponentModel.DataAnnotations namespace does not exist

我在Visual Studio 2013使用了ASP.NET MVC 5.2EF 6.Net 4.6

添加了System.ComponentModel.DataAnnotations dll但是当我想在我的项目中添加此命名空间时,它不存在。

我在类中只有System.ComponentModel.Design命名空间。

我有dll档案。

怎么了 ?

在Visual Studio模板中,默认情况下未引用System.ComponentModel.DataAnnotations,您必须手动添加特定的引用

解决方案资源管理器->添加参考->选择.Net选项卡->从列表中选择System.ComponentModel.DataAnnotations

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM