Why can't I reference System.ComponentModel.DataAnnotations?

后端 未结 14 1710
遥遥无期
遥遥无期 2020-11-28 08:47

I\'m trying to use DataAnnotations in my WPF project to specify a maximum length of strings, with the following:

using System.ComponentModel.DataAnnotations;         


        
14条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 09:29

    I also have this problem. That is very stupid when i add a namespace the same with System. I try to remove all references, but it is not resolved. I use "global::System.ComponentModel", it is working as well. When i remove my namespace, this problem has been resolved.

提交回复
热议问题