IDE-Defined Commands for Extending Project Systems

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at IDE-Defined Commands for Extending Project Systems.

When you want to extend project systems, you can use commands and command groups provided by the Visual Studio IDE.

The following sections list command items that are especially useful for extending project systems.

The following table shows the command menus that are useful locations for you to put high-level commands that invoke a project extender.

Command menuDescription
IDM_VS_MENU_PROJECTThe Project top-level menu.
IDM_VS_TOOL_PROJWINThe Solution Explorer toolbar.

The following table shows the shortcut menus that apply when a single node is selected in the Solution Explorer, or when there are multiple homogenous selections in the Solution Explorer, which is when all selected nodes are of the same type.

Shortcut menuDescription
IDM_VS_CTXT_PROJNODEApplies when the project node is selected.
IDM_VS_CTXT_ITEMNODEApplies when a file is selected.
IDM_VS_CTXT_FOLDERNODEApplies when a folder is selected.
IDM_VS_CTXT_WEBREFFOLDERApplies when the Web Reference folder is selected.
IDM_VS_CTXT_REFERENCEROOTApplies when the references root node called "References" is selected.
IDM_VS_CTXT_REFERENCEApplies when reference nodes are selected; these include assembly, COM, and project references only. Does not include Web references.

The following table shows the shortcut menus that apply when the selection in the Solution Explorer spans multiple hierarchies,

Shortcut menuDescription
IDM_VS_CTXT_XPROJ_SLNPROJApplies when the current selection contains the solution node and root project nodes.
IDM_VS_CTXT_XPROJ_SLNITEMApplies when the current selection contains the solution node and project items.
IDM_VS_CTXT_XPROJ_MULTIPROJApplies when the current selection consists of multiple root project nodes only.
IDM_VS_CTXT_XPROJ_PROJITEMApplies when the current selection contains a mix of root project nodes and project items. Additionally, the selection may contain the solution node.
IDM_VS_CTXT_XPROJ_MULTIITEMApplies when the current selection contains project items from multiple projects in the solution, or when items of different types are selected in the same project.

The following table shows the command groups that you can use when you extend projects, and that you can access through the IDM_VS_CTXT_PROJNODE shortcut menu.

Command groupDescription
IDG_VS_CTXT_PROJECT_BUILDCommands for building, rebuilding, and deploying the project.
IDG_VS_CTXT_COMPILELINKCommands for compiling and linking the project.
IDG_VS_CTXT_PROJECT_CONFIGCommands that set project configuration and build order.
IDG_VS_CTXT_PROJECT_ADDCommands that add items to the project.
IDG_VS_CTXT_PROJECT_STARTCommands that set the startup project associated with the F5 key.
IDG_VS_CTXT_PROJECT_SAVECommands for saving project items.
IDG_VS_CTXT_PROJECT_DEBUGCommands for debugging.
IDG_VS_CTXT_PROJECT_SCCCommands for source control.
IDG_VS_CTXT_PROJECT_TRANSFERCommands for cut, copy and paste operations.
IDG_VS_CTXT_PROJECT_PROPERTIESCommands that provide access to the Project Properties dialog box.

How VSPackages Add User Interface Elements
MenuCommands Vs. OleMenuCommands
Creating Reusable Groups of Buttons

Show: