2

Visual Studio main window top menu contains "Analyze" item that upon expansion shows items such as "profiler", "run code analysis", etc. If I want to add my add-in command invokation into any Visual Studio menu I need to craft a command table (.vsct file) and declare that my command belongs to a specific section by specifying its id.

The problem is MSDN only lists menu IDs for sections other than "analyze" - "analyze" section is never mentioned.

Is adding my add-in to "analyze" section allowed?

sharptooth
  • 167,383
  • 100
  • 513
  • 979
  • You can use the VSCT PowerToy extension to figure out the menu-id(s) you need: http://archive.msdn.microsoft.com/VSCTPowerToy – Matze Feb 10 '14 at 08:21

1 Answers1

3

You'll need this in the <Symbols> portion of your .vsct:

<GuidSymbol name="guidDiagMenuGroup" value="{CD68F8E6-2842-4F7E-AF7B-5A019631CEB5}">
  <IDSymbol name="IDM_DIAG_TOPLEVELMENU" value="0x0001"/>
</GuidSymbol>

Then your parent for your group should be:

<Parent guid="guidDiagMenuGroup" id="IDM_DIAG_TOPLEVELMENU"/>
Jason Malinowski
  • 18,148
  • 1
  • 38
  • 55
  • I'm very late to the party but I'm struggling with the same problem. Unfortunately, the answer doesn't work on VS 2017 update 9.3 – SENya Dec 01 '18 at 00:45