简体   繁体   中英

Visual Studio AddIn: How do I Add Item Specific Commands to the Solution Explorer Context Menu

I've spent about 3 days now trying to get this working but to no avail.

I'm fairly new to VS.NET extensibility and I find it hard to debug my problems.

I've already tried the code here presented: Visual Studio Add-In - adding a context menu item to solution-explorer

Couldnt make it work. Debugged it and no exception is being thrown. Plus I'd rather use an AddIn instead of a Package.

Anyone knows:

  • How to obtain a list of all context menus in the solution explorer?
  • How to add custom command groups to a context menu?
  • How to add a custom command to one custom command group of a context menu?

Thanks in advance.

This article shows how to create and display a context menu with the same look and feel than the ones of Visual Studio to be used in your own add-in user-interface.

Here is a tool that I recommend based on having used it: http://vssdkassist.codeplex.com/ . It is aimed at Visual studio packages as oposed to addins, but the method calls are similar between addins and vspackages. I would recommend setting up a vspackage project, use vssdkassist to do that, and use it to create your context menu. I would then recommend researching into the method calls etc that vssdkassist sets up for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM