Visual C# Compiler Error / Warning Number |
Rotor Error Name |
Summary |
Description |
CLS Rule Number |
CLS Rule |
? |
ERR_CLS_NoVarArgs |
? |
? |
? |
? |
CS3001 |
ERR_CLS_BadArgType |
Argument type 'type' is not CLS-compliant |
A public, protected, or protected internal method must accept a parameter whose type is compliant with the CLS. |
11 |
All types appearing in a signature shall be CLS-compliant. (p. 49 del PDF) |
CS3002 |
ERR_CLS_BadReturnType |
Return type of 'method' is not CLS-compliant |
A public, protected, or protected internal method must return a value whose type is compliant with the CLS. |
11 |
(vedi sopra) |
CS3003 |
ERR_CLS_BadFieldPropType |
Type of 'variable' is not CLS-compliant |
A public, protected, or protected internal variable must be of a type that is compliant with the CLS. |
11, 27 |
(vedi sopra per 11)
[The type of a property] shall be CLS-compliant, and shall not be managed pointers (i.e. shall not be passed by reference). (p. 64 del PDF) |
CS3004 |
ERR_CLS_BadUnicode |
Mixed and decomposed Unicode characters are not CLS-compliant |
Only composed Unicode characters are allowed in public, protected, or protected internal identifiers in order to be compliant with the CLS. |
4 |
Assemblies shall follow Annex 7 of Technical Report 15 of the Unicode Standard 3.0 (ISBN 0-201-61633-5) governing the set of characters permitted to start and be included in identifiers. Identifiers shall be in the canonical format defined by Unicode Normalization Form C. For CLS purposes, two identifiers are the same if their lowercase mappings (as specified by the Unicode locale-insensitive, 1-1 lowercase mappings) are the same. That is, for two identifiers to be considered different under the CLS they shall differ in more than simply their case. However, in order to override an inherited definition the CLI requires the precise encoding of the original declaration be used. (p. 44 del PDF) |
CS3005 |
ERR_CLS_BadIdentifierCase |
Identifier 'identifier' differing only in case is not CLS-compliant |
A public, protected, or protected internal identifier, which differs from another public, protected, or protected internal identifier only in the case of one or more letters, is not compliant with the CLS. |
4 |
(vedi sopra) |
CS3006 |
ERR_CLS_OverloadRefOut |
Overloaded method 'method' differing only in ref or out is not CLS-compliant |
A method does not cannot be overloaded based on the ref or out parameter and still comply with the CLS. |
38 |
Properties, instance methods, and virtual methods may be overloaded based only on the number and types of their parameters, except the conversion operators named op_Implicit and op_Explicit which may also be overloaded based on their return type. (p. 72 del PDF) |
CS3008 |
ERR_CLS_BadIdentifier |
Identifier 'identifier' is not CLS-compliant. |
A public, protected, or protected internal identifier breaks compliance with the CLS if it begins with an underscore character "_". |
4 |
(vedi sopra)
da vedere anche il mio post precedente |
CS3009 |
ERR_CLS_BadBase |
'type': base type 'type' is not CLS-compliant. |
A base type was marked as not having to be compliant with the CLS in a module that was marked as being CLS compliant. Either remove the attribute that specifies the module is CLS compliant or remove the attribute that indicates the type is not CLS compliant. |
? |
? |
CS3010 |
ERR_CLS_BadInterfaceMember |
'member': CLS-compliant interfaces must have CLS-compliant members |
In a module marked with [assembly:CLCSompliant(true)], an interface contains a member marked with [CLCSompliant(false)]. Remove one of the CLS compliance attributes. |
18 |
CLS-compliant interfaces shall not require the definition of non-CLS compliant methods in order to implement them. (p. 55 del PDF) |
CS3011 |
ERR_CLS_NoAbstractMembers |
'member': only CLS-compliant members can be abstract |
A class member cannot be both abstract and non-compliant with the CLS. The CLS specifies that all class members shall be implemented. |
? |
? |
CS3012 |
ERR_WRN_NotOnModules Compiler Warning (level 1) |
You must specify the CLSCompliant attribute on the assembly. |
In order for a module to be compliant with the CLS through [module:System.CLCSompliant(true)], it must be built with the /target:module compiler option. |
- |
- |
CS3013 |
ERR_CLS_ModuleMissingCLS |
Added module is not CLS-compliant, or is missing CLSCompliant attribute. |
A module that was compiled with the /target:module compiler option was added to a compilation with /addmodule. However, the module's compliance with the CLS does not agree with the CLS state of the current compilation.
CLS compliance is indicated with the module attribute. For example, [module:CLSCompliant(true)] indicates that the module is CLS compliant, and [module:CLSCompliant(false)] indicates that the module is not CLS compliant. The default is [module:CLSCompliant(false)]. |
- |
- |
CS3014 |
ERR_CLS_AssemblyNotCLS |
'member' cannot be marked as CLS compliant because the assembly is not marked as compliant |
In a source code file where compliance with the CLS was declined, a construct in the file was marked as being CLS compliant. This is not allowed. Remove one of the CLSCompliant specifications. |
2 |
Members of non-CLS compliant types shall not be marked CLS-compliant. (p. 36 del PDF) |
CS3015 |
ERR_CLS_BadAttributeType |
'method signature' has no accessible constructors which use only CLS compliant types. |
To be compliant with the CLS, the argument list of an attribute class cannot contain an array. |
34 |
The CLS only allows a subset of the encodings of custom attributes. The only types that shall appear in these encodings are: System.Type, System.String, System.Char, System.Boolean, System.Byte, System.Int16, System.Int32, System.Int64, System.Single, System.Double, and any enumeration type based on a CLS-compliant base integer type. (p. 69 del PDF) |
CS3016 |
ERR_CLS_ArrayArgumentToAttribute |
Arrays as attribute arguments is not CLS-compliant. |
It is not compliant with the CLS to pass an array to an attribute. |
34 |
(vedi sopra) |