S3992 — Assemblies should explicitly specify COM visibility

Language
VB.NET
Type
Code smell
Severity
Major
Tags
api-design

Why is this an issue?

Assemblies should explicitly indicate whether they are meant to be COM visible or not. If the ComVisibleAttribute is not present, the default is to make the content of the assembly visible to COM clients.

Note that COM visibility can be overridden for individual types and members.

Noncompliant code example


Namespace MyLibrary  ' Noncompliant

End Namespace

Compliant solution


<Assembly: Runtime.InteropServices.ComVisible(False)>

Namespace MyLibrary

End Namespace

↑ Back to top