CA1017: Mark assemblies with ComVisibleAttribute
Visual Studio 2012
|
TypeName |
MarkAssembliesWithComVisible |
|
CheckId |
CA1017 |
|
Category |
Microsoft.Design |
|
Breaking Change |
Non-breaking |
An assembly does not have the System.Runtime.InteropServices.ComVisibleAttribute attribute applied to it.
The ComVisibleAttribute attribute determines how COM clients access managed code. Good design dictates that assemblies explicitly indicate COM visibility. COM visibility can be set for a whole assembly and then overridden for individual types and type members. If the attribute is not present, the contents of the assembly are visible to COM clients.
The following example shows an assembly that has the ComVisibleAttribute attribute applied to prevent it from being visible to COM clients.