8

I'm developing my first add-in for Visual studio and we need to add a context menu item to the solution explorer, that shows up for particular file types only (in our case - ".resx").

I've been googling for 2 days now, unable to find any tutorials or code-samples... Only very basic things like adding a menu-item to the VS "tools" menu etc.

Alex from Jitbit
  • 53,710
  • 19
  • 160
  • 149

1 Answers1

4

Well, you need to create a dynamically visible command that you will make visible only when the selected node in the Solution Explorer is .resx file and then add the command as a child of the Solution Explorer context menu (you would need GUID:ID pair of the latter).

Here is a good article showing how to do that: http://blogs.rev-net.com/ddewinter/2008/03/22/dynamic-menu-commands-in-visual-studio-packages-part-2/

Oleg Tkachenko
  • 2,716
  • 18
  • 8
  • 1
    A working one (except images): http://davedewinter.com/2008/03/22/dynamic-menu-commands-in-visual-studio-packages-part-2/ – Jim Oct 16 '12 at 06:55
  • Oleg, @Alex 's problem is why you must [quote the most relevant part of an important link](https://stackoverflow.com/help/how-to-answer)! (also note the new link went down too) – NH. Mar 07 '18 at 19:20