A: 

You have declared a class like next:

[SomeAttribute(new string[] { "foo", "bar" })
class SomeClass { }

or have declared an attribute like next:

class SomeAttribute : Attribute
{
    public SomeAttribute(string[] arr) { } // or another array
}

And all this is happening because your assembly is marked to be CLSCompliant:

[assembly:CLSCompliant(true)]

abatishchev
I know why it happens. I am the one who marked the assembly as CLSCompliant(true) in the first place. I wish to fix all the non CLS compliant places, but having a hard time to find them all manually.
mark
+1  A: 

FxCop locates most sources of CLS non-compliance, and it will give File/Line information associated with the error.

sixlettervariables
Hmmm, if this is an internal attribute, you may have trouble locating this with FxCop. Also, it should be immediately obvious which classes are Attributes...right?
sixlettervariables
+1  A: 

I'd adopt the following process:

  • Identify the attributes that have arrays in their constructors (sophistication required to do this obviously depends on how many classes you have that derive from Attribute)
  • Use the Visual Studio "Find All References" option on the attribute class constructors to find the things that are decorated with the attribute using arrays.

The first part should be fairly easy if the attributes in question are defined in your solution.

If the attributes are from a dependency then you might have to use a regex search to find the places where such attributes are used.

DanK