I've got a VS2012 extensibility package that adds commands to a menu using the DynamicItemStart
command flag, as described on MSDN. These commands work a bit like the inbuilt External Tools facility, so the exact set is configured by the addin user, rather than being defined by me. A DynamicItemStart
command seems most suitable for this.
As per the example, I add a bunch of items, hide them, and then control the visibility using the BeforeQueryStatus
callback. This all appears to be working: the menu items appear exactly as I'd expect, and you can invoke them by clicking them with the mouse. My package also has one fixed command, and that works too.
My non-dynamic command also appears in the commands list in Tools|Options, Keyboard section, so you can make a keyboard shortcut for it. (You can also invoke it from the Immediate window, which appears to use the same list.) But my dynamic commands don't appear! I was expecting them to turn up as some kind of auto-generated list, like Tools.ExternalCommand
.
Are DynamicItemStart
commands just not invokable in this way?