Why is my use of MEF not consistent with CLS?

When I compile the Silverlight application, all elements decorated with MEF attributes warn of CLS non-compliance. When I compile again, the warnings do not return, and my application seems to be working fine. Is this something I need to worry about? I use the standard naming convention for properties, classes, etc. The only time I use underscores is private members.

+3
source share
1 answer

I would suggest that an assembly containing MEF attributes does not have a CLSCompliant attribute set.

IE, if you are referencing the Silverlight class library, the class library must have this attribute in the AssemblyInfo file:

[assembly: CLSCompliant(true)]
+2

Source: https://habr.com/ru/post/1794222/


All Articles