The guid attribute must be specified with the comimport attribute
The guid attribute must be present when using the comimport attribute.
The following sample generates CS0596:
namespace x { [comimport] public class a // CS0596 // try the following line to resolve this CS0596 // [comimport, guid("00000000-0000-0000-0000-000000000001")] { } public class b { public static void Main() { } } }