Visual Studio 
Visual Web Developer Extensibility 

Visual Studio provides a UI for managing several kinds of projects, including Web site projects. The EnvDTE and EnvDTE80 namespaces provide interfaces with objects and members for managing projects in Visual Studio, and the VsWebSite namespace additionally provides automation interfaces for managing Web site projects. Using the interfaces in these namespaces, you can create automation utilities that manage projects and Web site projects from macros or add-ins to Visual Studio.

The automation interfaces in the VsWebSite namespace extend the functionality of Web projects beyond the core project support in the EnvDTE and EnvDTE80 namespaces, providing project support for Web site projects. For example, there is no way to add a WebReference to a EnvDTE.Project instance, but you can add one to a VSWebSite instance, which is a also a kind of project.

NoteNote

The functionality provided by VsWebSite is not available in Visual Web Developer Express Edition.

The primary class for automating Web site projects is VSWebSite, which encapsulates the methods and properties for automating a Web site project.

Most scenarios for automating project management tasks involve enterprise processes. For example, you can create a wizard for creating new Web sites within your organization. The wizard can ensure that intranet Web sites conform to procedures or standards, or it can notify appropriate people about a new Web site in the organization.

As additional examples, you might create applications that perform tasks such as the following:

  • Applying global modifications to all Web site projects in an organization.

  • Adapting all projects to new enterprise requirements.

  • Creating a report on the current contents of all Web sites.

  • Converting existing Web sites to Visual Studio 2005 Web site projects.

Or you might create an add-in to Visual Studio that logs all new connections to external Web services or sends e-mail when new items are added to a Web site project. For more information about creating add-ins for Visual Studio, see How to: Create Solution Add-ins.

Related Sections

Automation and Extensibility Reference

Provides links to additional information about automating Visual Studio.

EnvDTE

Describes a managed code wrapper for a COM library containing the objects and members for Visual Studio core automation.

EnvDTE80

Contains the objects and members for Visual Studio core automation. This namespace extends the functionality provided by EnvDTE.

VsWebSite

Describes a managed code wrapper for a COM library containing the objects and members for manipulating Web site projects within Visual Studio.

Tags :


Community Content

Craig Skibo - MSFT
The VSWebSite interop assembly
Code for interacting with the VSWebSite project type is contained within the assembly VsWebSite.Interop.dll, and can be added to your project through the Add Reference dialog box.
Tags :

Craig Skibo - MSFT
Programming the web site project object model

To program a web site project opened in the Visual Studio IDE, you will need to use the VsWebSite.VSWebPackage interface, contained within the interop assembly PIA VSWebSite.Interop.dll. To get a reference to this interface, you will need to run code such as this macro:

Sub vswebsite()

  Dim vsws As VsWebSite.VSWebPackage

  vsws = DTE.GetObject("WebPackage")

End Sub

Existing web sites can be opened and new web sites can be created through the VSWebPackage interface.

Tags :

Page view tracker