Is there a way to programmatically open the NuGet Package Manager GUI from a VSPackage implemented in C#?
The idea is to allow the user to quickly navigate from an ErrorTask
entry to the package manager where the specific problem could be resolved.
There are a couple of different ways to do this.
You will need to use the EnableVSIPLogging registry value to identify the guid:id pair that uniquely identifies the menu command, as discussed in the following blog entry:
Using EnableVSIPLogging to identify menus and commands with VS 2005 + SP1
Hint, instead of messing with the registry, consider installing Mads Kristensen's "Extensibility Tools" extension, which adds an "Enable VSIP Logging" menu item under the IDE's "View" menu. After turning this on, and restarting VS, you can hold down SHIFT+CTRL keys, and then click on the "Package Manager Console" menu item that will display a diagnostic dialog containing the guid and id for the command you just clicked.
Not all toolwindow guids are published, but you can often figure them out by using Paul Harrington's "Component Diagnostics" extension. After installing the extension, you can invoke it via the Help|Component Diagnostics menu item. In the left hand pane of the Component Diagnostics dialog, you will want to select the "Selection and UIContext" category. And in the right hand pane of the dialog, you'll want to select the "Live Contexts" tab.
Once you have that selected, switch back to the VS IDE, and open the Package Manager Console toolwindow, and click inside it to ensure it's activated. You should see the toolwindow's context guid show up in under that "Live Contexts" pane. In most instances, the UI context is the same value as the guid that uniquely identifies the toolwindow.
Once you have the identified the guid, you can use the IVsUIShell.FindToolWindowEx method to (create it if needed) and retrieve it's IVsWindowFrame interface. And with that IVsWindowFrame interface, you can Show and Activate the toolwindow.