Attribute '<attributename>' cannot be applied to '<membername>' because the attribute is not valid on this declaration type
The attribute you are using is not appropriate for the item you are using.
Error ID: BC30662
To correct this error
Choose an attribute that is intended for the item you are using. For example, if you are using method, choose an attribute designed to be used with methods.
If you are using custom attributes that you developed, change the AttributeUsage attribute to match the kind of item you are using.