Introduction to the VSProject2 Object

The VSProject2 object provides access to the Visual Basic and Visual C# project structure.

Following are the properties and methods specific to Visual Basic and Visual C#:

The VSProject2 object also has properties to help you work your way back to objects in the general extensibility model. These properties include:

  • The DTE property returns the top-level extensibility object. You have access to the entire Visual Studio extensibility object model through this property.

  • The Project property returns the general extensibility object for the project. This object includes properties, methods, and events that are common to all Visual Studio projects.

The following table provides links to topics that detail how to use the VSProject2 object to create and control Visual Basic and Visual C# projects.



Create Visual C# and Visual Basic projects, use .zip-files to add project items, use the VSProject2 object to control the project.

How to: Manipulate Visual Basic and C# Projects By Using the VSProject2 Object

Create Visual Basic projects and use the Imports property to obtain a handle to the Imports object.

How to: Manipulate the Imports Property of Visual Basic Projects