This documentation is archived and is not being maintained.

Compiler Warning (level 1) CS3014 

Error Message

'member' cannot be marked as CLS compliant because the assembly does not have a CLSCompliant attribute

In a source code file where compliance with the Common Language Specification (CLS) was not specified, a construct in the file was marked as being CLS compliant. This is not allowed. To resolve this warning, add an assembly level CLS compliant attribute to the file (in the example below, uncomment the line containing the assembly level attribute). For more information on CLS Compliance, see Writing CLS-Compliant Code and Common Language Specification.

Example

The following example generates CS3014:

// CS3014.cs

using System;

// [assembly:CLSCompliant(true)]
public class I
{
    [CLSCompliant(true)]   // CS3014
    public void mf()
    {
    }

    public static void Main()
    {
    }
}
Show: