Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Warning (level 1) CS3012 

Error Message

You must specify the CLSCompliant attribute on the assembly, not the module, to enable CLS compliance checking

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.


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()
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.