Compiler Warning (level 2) CS3019
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Warning (level 2) CS3019 

Error Message

CLS compliance checking will not be performed on 'type' because it is not visible from outside this assembly.

This warning occurs when a type or a member that has the CLSCompliantAttribute attribute is not visible from another assembly. To resolve this error, remove the attribute on any classes or members that are not visible from the other assembly, or make the type or members visible. For more information on CLS Compliance, see Writing CLS-Compliant Code.


The following sample generates CS3019:

// CS3019.cs
// compile with: /W:2

using System;

[assembly: CLSCompliant(true)]

// To fix the error, remove the next line
[CLSCompliant(true)]  // CS3019
class C
    [CLSCompliant(false)]  // CS3019
    void Foo()

    static void Main()

See Also

© 2015 Microsoft