'attribute' can only be specified on an empty class
Certain attributes can only be applied to an empty class.
The following sample generates CS0595:
[comimport, guid("00000000-0000-0000-0000-000000000001")] // CS0595 public class MyClass { // CS0595, class is not empty // delete the definition of MyFunc to resolve public static void MyFunc() { // remove Main to resolve CS0595 } } public class MyClass2 { public static void Main() { } }