Classes marked with the attribute attribute must have at least one public instance constructor
A public constructor is required for an attribute class.
The following sample generates CS0607:
using System; [AttributeUsageAttribute(AttributeTargets.All)] public class MyAttribute : Attribute { MyAttribute() { // CS0607 // try the following line instead // public MyAttribute() { } public static void Main() { } }