Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CA1014 Mark 'some.dll' with CLSCompliant(true) error message with StyleCop of VS2010

When I run StyleCop, I got this error message saying that I need to Mark the dll with CLSCompliant(true).

What is this? How can I set the Mark the dll with CLSCompliant(true)?

Error   4   CA1014 : Microsoft.Design : 
Mark 'SOMETHING.dll' with CLSCompliant(true) because it exposes externally 
                     visible types. ModelsimCommunicator
like image 289
prosseek Avatar asked May 23 '11 21:05

prosseek


1 Answers

To mark the DLL as CLS compliant do the following in the root namespace.

[assembly: CLSCompliant(true)]

Note: This error is coming from FxCop not StyleCop. FxCop errors are prefixed with CA while StyleCop uses the SA prefix

like image 108
JaredPar Avatar answered Sep 27 '22 23:09

JaredPar