开发者

Why is my MEF usage not CLS-compliant?

开发者 https://www.devze.com 2023-02-13 04:25 出处:网络
When I compile my Silverlight applicatio开发者_StackOverflow中文版n, all of the elements that are decorated with MEF attributes are warning of CLS-noncompliance. When I compile again, the warnings do

When I compile my Silverlight applicatio开发者_StackOverflow中文版n, 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.


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)]
0

精彩评论

暂无评论...
验证码 换一张
取 消