How to change the value of the ComVisibleAttribute attribute in Visual Studio 2005

This article has been archived. It is offered "as is" and will no longer be updated.
INTRODUCTION
This article describes how to change the value of the ComVisibleAttribute attribute in Microsoft Visual Studio 2005 for software development. The ComVisibleAttribute attribute determines how Microsoft Component Object Model (COM) clients access the managed code.

Note By default, the value of the ComVisibleAttribute attribute is True in Visual Studio 2005 and in earlier versions of Visual Studio.
MORE INFORMATION
To change the value of the ComVisibleAttribute attribute in Visual Studio 2005, use one of the following methods.

Method 1: Change the value of the ComVisibleAttribute attribute at the assembly level

To change the value of the ComVisibleAttribute attribute at the assembly level, follow these steps:
  1. Start Visual Studio 2005.
  2. On the View menu, click Solution Explorer.
  3. In Solution Explorer, click a project node.
  4. On the Project menu, click a project name, and then click Properties.

    Alternatively, right-click a project node in Solution Explorer, and then click Project.
  5. In the Project Designer, click the Application tab.
  6. On the Application page, click Assembly Information.
  7. In the Assembly Information dialog box, click to select the Make assembly COM-Visible check box, or click to clear the Make assembly COM-Visible check box.
  8. Click OK.

Method 2: Change the value of the ComVisibleAttribute attribute at the type level

For information about how to change the value of the ComVisibleAttribute attribute at the type level, visit the following Microsoft Developer Network (MSDN) Web site:Note When you do not explicitly set the ComVisibleAttribute attribute for a type, the value of the ComVisibleAttribute attribute that is set at the assembly level is used as the value for that type.
REFERENCES
For more information about the Assembly Information dialog box, visit the following MSDN Web site:
Properties

Article ID: 935232 - Last Review: 01/16/2015 02:02:30 - Revision: 1.1

Microsoft Visual Studio 2005 Team Edition for Software Architects, Microsoft Visual Studio 2005 Team Edition for Software Developers, Microsoft Visual Studio 2005 Team Edition for Software Testers, Microsoft Visual Studio 2005 Standard Edition, Microsoft Visual Studio 2005 Professional Edition, Microsoft Visual Studio 2005 Express Edition

  • kbnosurvey kbarchive kbinfo kbexpertiseinter kbhowto KB935232
Feedback