Monitor if the DTE is changed

Q:

 

Is there any event to monitor if the DTE solution, project, or source files have been changed?

 

 

A:

 

The events like those below should address your needs, though there is not a general ‘changed’ event for each object (solution, project, and source file).

Here’s some helpful guidance (The document is for VS 2005, so there are some improvements for VS2008.)

 

DTEEventsClass Events

Events

 

Name

Description

ModeChanged

Occurs when the mode of the development environment (build, run, or debug) is changed.

OnBeginShutdown

Occurs when the development environment is closing.

OnMacrosRuntimeReset

Occurs when the common language runtime resets, clearing all global variable data and losing all event connections.

OnStartupComplete

Occurs when the environment has completed initializing.

 

 

SolutionEventsClass Members

Events

 

Name

Description

AfterClosing

Occurs immediately after closing a solution.

BeforeClosing

Occurs immediately before closing a solution.

Opened

Occurs immediately after opening a solution or project.

ProjectAdded

Occurs immediately after adding a project to the solution.

ProjectRemoved

Occurs after you remove a project from the solution.

ProjectRenamed

Occurs after you rename a project in the solution.

QueryCloseSolution

Occurs before the BeforeClosing.

Renamed

Occurs after you rename a solution.

 

ProjectsEventsClass Events

 

Name

Description

ItemAdded

Occurs immediately after you add a project to a solution or an item to a project.

ItemRemoved

Occurs immediately after you remove a project from a solution or a project item from a project.

 

ItemRenamed

Occurs immediately after you rename a project in a solution or a project item in a project.

Top

ProjectItemsEventsClass Events

Events

 

Name

Description

ItemAdded

Occurs immediately after you add a project to a solution or an item to a project.

ItemRemoved

Occurs immediately after you remove a project from a solution or a project item from a project.

ItemRenamed

Occurs immediately after you rename a project in a solution or a project item in a project.

 

 


Posted May 27 2009, 09:08 AM by BillL
Copyright Summit Software Company, 2008. All rights reserved.