Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get full list of available commands for DTE.ExecuteCommand

I use VS2010 and Addin, using DTE.ExecuteCommand and commands like Build, Build.Cancel, Build.RebuildSolution, etc.

You can get a command with DTE.Commands.Item("xxx") and guess if it is available with Command.IsAvailable. The list of commands is in the Tools, Options window, Environment, Keyboard section.

Too, as you know DTE.ExecuteCommand takes two strings as parameters.

The first one is the name of the command (for example, Action.CreateNewShortcut) and the second one is the arguments that the command takes.

The problem is that some commands require a variable number of arguments and I don't know the order, etc.

For example I guess Action.CreateNewShortcut needs at least two arguments: the action to be run when the shortcut is executed (Build.RebuildSolution) and the shortcut itself ( Alt+O).

There are over 4k commands in VS. but Microsoft hasn't official documentation about it, I think.

It would be very useful any official documentation with FULL list of available commands for DTE.ExecuteCommand

Any suggestions?

like image 540
Kiquenet Avatar asked Dec 13 '12 07:12

Kiquenet


2 Answers

A list of commands can be examined by following this procedure:

  • Open Visual Studio's Options Dialog Box
  • Select the Environment/Keyboard page
  • You can search for a specific command in the "Show commands containing:" box, or just scroll the list behind it.

enter image description here

like image 78
wip Avatar answered Oct 18 '22 20:10

wip


You can use immediate window to do it. Simply type '>' and start typing command.

like image 24
Mic Avatar answered Oct 18 '22 21:10

Mic