Export (0) Print
Expand All

Introduction to the VSProject Object

Visual Studio .NET 2003

The VSProject 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 Imports property contains a collection of all the project-level Imports statements in a Visual Basic project. Adding an Imports statement to this collection is equivalent to adding the same statement to each code file in the project. For more information, see Imports Object.
  • The References property contains a collection of all the references in a project. For more information, see References Object.
  • The WebReferencesFolder property, which is a ProjectItem object, contains a collection of all the Web references in the project in its ProjectItems property. You can use the CreateWebReferencesFolder method to create this project item and then add Web references using the AddWebReference method.
  • The WorkOffline property determines whether you are working with your Web project online or offline.
  • The TemplatePath property is used to create new projects and new project items. To copy projects, use the CopyProject method.
  • The Refresh method updates Solution Explorer after changes are made to the project.
  • The BuildManager property provides access to the temporary portable executables needed to implement custom tools and designers. For more information, see Introduction to the BuildManager Object and BuildManager Object.

The VSProject 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.

See Also

VSProject Object | What's New in Extensibility and Automation

Show:
© 2014 Microsoft