Attribute 'attribute' is not valid on this declaration type. It is valid on 'type' declarations only.
An attribute was applied to a keyword for which it was not intended.
The following sample generates CS0592:
[interfacetype()] public class a { // CS0592, dual is valid for an interface public static void Main() { } }