“<typename>”没有“System.AttributeUsageAttribute”属性,因此不能用作属性

更新:2007 年 11 月

试图使用一个在没有 System.AttributeUsageAttribute 的情况下声明的属性来定义其用法。

**错误 ID:**BC31505

更正此错误

  • 自定义属性必须是从应用了 AttributeUsageAttribute 属性的 System.Attribute 派生的类。

请参见

参考

AttributeUsageAttribute

其他资源

Visual Basic 中的自定义属性 (Attribute)