Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You cannot specify the CLSCompliant attribute on a module that differs from the CLSCompliant attribute on the assembly
In order for a module to be compliant with the Common Language Specification (CLS) through [module:System.CLCSompliant(true)], it must be built with the /target:module compiler option. For more information on the CLS, see Common Language Specification.
Example
The following example, when built without /target:module, generates CS3012:
// CS3012.cs
// compile with: /W:1
[module:System.CLSCompliant(true)] // CS3012
public class C
{
public static void Main()
{
}
}