Поделиться через


Visual Web Developer Extensibility

Visual Studio provides a UI for managing several kinds of projects, including Web site projects. The EnvDTE, EnvDTE80, EnvDTE90, and EnvDTE100 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, EnvDTE80, EnvDTE90, and EnvDTE100 namespaces, providing project support for Web site projects. For example, there is no way to add a WebReference to a Project instance, but you can add one to a VSWebSite instance, which is also a kind of project.

Note

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 Web site projects for the current version of Visual Studio.

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.

  • 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.

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

  • EnvDTE100
    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.