You cannot specify CLSCompliant attribute on modules
In order for a module to be compliant with the Common Language Subset (CLS), via [module:System.CLCSompliant(true)]
, it must be built with the /target:module compiler option.
The following sample, when built without /target:module, generates CS3012:
[module:System.CLSCompliant(true)] public class C { public static void Main() { } }