Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get list of Visual Studio commands?

We are working on an VS extension that requires a list of Visual Studio commands like the one in this screen shot:

Screen Shot from Visual Studio 2010, Tools > Options > Keyboard

Example:

  • Action.Add
  • Action.Add.NETFrameworkLaunchCondition
  • Action.AddAction
  • ... etc.

Where can we find or how can we access this list?

like image 534
Byron Sommardahl Avatar asked Aug 07 '12 13:08

Byron Sommardahl


2 Answers

You can access it via the DTE interfaces. Get the EnvDTE.DTE interface via GetService(typeof(SDTE)) (or other appropriate mechanism) and then:

EnvDTE.DTE dte = ...;
var commands = dte.Commands.Cast<EnvDTE.Command>();

foreach (var command in commands.OrderBy(c => c.Name))
{
    Console.WriteLine(command.Name);
}

I should mention this can be quite slow, so it's best avoided if you can...

like image 98
Jason Malinowski Avatar answered Oct 06 '22 04:10

Jason Malinowski


visual studio contains this lists ...\Microsoft Visual Studio 9.0\Common7\IDE\*.vsk

like image 43
burning_LEGION Avatar answered Oct 06 '22 05:10

burning_LEGION