Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Add-In - adding a context menu item to solution-explorer

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.

like image 952
Alex from Jitbit Avatar asked Mar 21 '10 11:03

Alex from Jitbit


1 Answers

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/

like image 121
Oleg Tkachenko Avatar answered Oct 21 '22 04:10

Oleg Tkachenko