I porting my add-in to a VS package and not sure how to replace this code that create a new command:
I also need to replace IDTExtensibility2.QuerySTatus that I used to manage the status of the command.
Command cmd = ((Commands2)_applicationObject.Commands).AddNamedCommand2(_addInInstance,"MyCommand","My Command...","My Command...",
true, -1, ref contextGUIDS,
(int)vsCommandStatus.vsCommandStatusSupported +
(int)vsCommandStatus.vsCommandStatusEnabled,
(int)vsCommandStyle.vsCommandStylePictAndText,
vsCommandControlType.vsCommandControlTypeButton);
CommandBar toolsCmdBar = ((CommandBars)_applicationObject.CommandBars)["Tools"];
cmd.AddControl(toolsCmdBar, toolsCmdBar.Controls.Count + 1);I also need to replace IDTExtensibility2.QuerySTatus that I used to manage the status of the command.