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

后端 未结 14 1687
遥遥无期
遥遥无期 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:43

    I had same problem, I solved this problem by following way.

    Right click on page, select Property. in build action select Content.

    Hope that this solution may help you.

提交回复
热议问题