Posted 15 years ago by shark92651
Avatar
I get errors that types in ActiproSoftware.SyntaxEditor are "not CLS-Compliant" when I use them as public members - SyntaxLanguage, for instance. This is a bit of a concern because I must now mark MY assembly as non-CLS-Compliant. Or am I missing something here?

Thanks,
David

Comments (4)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I'm not sure what would cause that. It is completely written in C# and compiled in VS.NET. Is there a way that you know of to determine what would cause that?


Actipro Software Support

Posted 15 years ago by shark92651
Avatar
You can still create non CLS-Compliant code in C#. For instance, having 2 public members whose names only differ in case would cause it to be non-compliant (because VB.Net for instance does not support case-sensitive identifiers). Check the AssemblyInfo.cs file for the following attribute:

[assembly:CLSCompliant(true)]

Here is one of the errors I get when I try to include SemanticCSharpParser class into my assembly:

Argument type 'ActiproSoftware.SyntaxEditor.TokenStream' is not CLS-compliant

Here is what the help says about the error

Argument type 'type' is not CLS-compliant
A public, protected, or protected internal method must accept a parameter whose type is compliant with the Common Language Specification (CLS).
The following sample generates CS3001:
// CS3001.cs
[assembly:System.CLSCompliant(true)]

public class a
{
public void bad(ushort i) // CS3001
{
}

private void OK(ushort i) // OK, private method
{
}

public static void Main()
{
}
}
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We had not been including that attribute since it wasn't part of the default attribute set in AssemblyInfo.cs. I'll try and get that added for a future release and will let you know if I need more information from you. Thanks!


Actipro Software Support

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The next release of SyntaxEditor is now CLS-compliant.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 7 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.