COBCH1704 アセンブリには、CLSCompliant 属性がないので、'<メンバ>' に CLSCompliant(true) は許可されない

属性 CLSCompliant(true) が包含アセンブリに設定されていないため、この要素 (およびアセンブリ内の他の要素) は CLS 準拠ではありません。

assembly-attributes 段落で CLSCompliant(true) 属性を設定するか、アセンブリ メンバーからその属性を削除します。

class-id myClass.
assembly-attributes.             *> add these two lines
 attribute CLSCompliant(true).   *> to enable the other CLSCompliant attribs

01 myfield1 binary-long signed attribute CLSCompliant(true). *> or remove this attribute

method-id myMethod attribute CLSCompliant(true). *> and remove this attribute
...
end method.
end class.

CLSCompliant 属性の設定には次のルールがあります。

  • アセンブリ レベルで属性を設定すると、アセンブリ内の全メンバが CLS 準拠になり、CLS 準拠でない場合にコンパイラが警告を発します。
  • アセンブリ レベルで属性を設定する際には、個々のメンバに CLSCompliant(false) 属性を設定して警告が発生しないようにできます。
  • メソッドまたはフィールドに属性を設定する際には、包含されるクラスまたはアセンブリにも属性を設定する必要があります。
  • クラスに属性を設定する際には、包含されるアセンブリにも属性を設定する必要があります。