简体   繁体   中英

the System.ComponentModel.DataAnnotations namespace does not exist

I used ASP.NET MVC 5.2 and EF 6 and .Net 4.6 in Visual studio 2013 .

Iadded System.ComponentModel.DataAnnotations dll but when I want add this namespace in my project It does not exist.

I just have System.ComponentModel.Design namespace in classes.

I have dll in refrences .

whats wrong ?

System.ComponentModel.DataAnnotations is not referenced by default in the visual studio templates you have to add the particular reference manually

Solution explorer -> Add reference -> Select .Net tab -> select System.ComponentModel.DataAnnotations from the list

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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