System.ComponentModel.DataAnnotations.compare vs System.Web.Mvc.Compare

前端 未结 6 1934
星月不相逢
星月不相逢 2020-12-24 04:44

MVC 4 Beta project fails to compile after upgrading to .Net 4.5.

This happens due to conflict between System.ComponentModel.DataAnnotations.CompareAttribute

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-24 05:39

    If you wish to be explicit about the reference, you can simply add this line:

    using CompareAttribute = System.Web.Mvc.CompareAttribute;

提交回复
热议问题