开发者

Why is my MEF usage not CLS-compliant?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜