Daniel O'Connell wrote:
> "Edward Diener" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Is the default 'false' for the CLSCompliant attribute at the assembly
>> level ? Are there any tools to check for CLS compliance for the
>> various NET languages ?
>
> The first part you could have found on your own, from msdn:
> If no CLSCompliantAttribute is applied to a program element, then by
> default:
>
> a.. The assembly is not CLS-compliant.
> b.. The type is CLS-compliant only if its enclosing type or
> assembly is CLS-compliant.
> c.. The member of a type is CLS-compliant only if the type is
> CLS-compliant.
That is a bit confusing, but I have found the area in MSDN which explains
it. Obviously if no CLSCompliantAttribute is applied to a specific program
element, the assembly could still be CLS-compliant if the
CLSCompliantAttribute is applied to the assembly, so "a." is incorrect.
Furthermore if instead the above means "If no CLSCompliantAttribute is
applied to any program element", which would make "a." correct, then "b." or
"c." is irrelevant, but I don't think that is what it means. However, I do
gather from the above that the default for CLS compliance at the assembly
level is 'false', which is what I wanted to know from the original question.
> as for the second part, fxcop[1] will run across assemblies and give
> you alot of information about the assembly, including naming and
> atleast some cls compliance. Currently, any of MS's design guidelines
> that are revised and posted(usually via Brad Abrams) contain
> suggestions for additional rules to fxcop. It can also be extended to
> add your own rules.
>
> 1: http://www.gotdotnet.com/team/fxcop/
Thanks for the info on fxcop. I was not aware of this program and what it
does.