特性“<attributename>”不能应用于程序集

试图将特性应用于某个程序集,该程序集的 AttributeUsageAttribute 未指定 AttributeTargets.Assembly。 声明该特性时,未定义其适用于程序集。

错误 ID: BC30548

更正此错误

  1. 检查特性声明,并指定 AttributeTargets.AssemblyAttributeTargets.All

另请参阅