Jordan
Jordan

Reputation: 9901

Why is my MEF usage not CLS-compliant?

When I compile my Silverlight application, all of the elements that are decorated with MEF attributes are warning of CLS-noncompliance. When I compile again, the warnings do not return, and my application seems to run fine. Is this something that I need to worry about? I'm using a standard naming convention for properties, classes, and such. The only time I use underscores is with private members.

Upvotes: 3

Views: 246

Answers (1)

Steve Wranovsky
Steve Wranovsky

Reputation: 5713

I'd assume the assembly the MEF attributes were contained in do not have the CLSCompliant attribute set.

IE, if you reference a Silverlight class library, the class library should have this attribute set in its AssemblyInfo file:

[assembly: CLSCompliant(true)]

Upvotes: 2

Related Questions