I've created a VS2008 addin project, and wish to add a context menu item for the following scenario: Right Clicking on an unloaded project within the Solution Explorer of visual studio.
Currently this context menu shows "Reload project, Edit {project name}.csproj, Edit, Remove".
I would like to add my own menu item here.
Can anyone help with how I can reference this menu? I can add to the "Tools" menu with:
Manually you can do this this way (maybe this helps you how to reference the context menu)
Click any tiny arrow at the end of one of your toolbar\add or remove buttons\customize\toolbars\check "context menus"\a new toolbar appears where you can customize any context menu.
Maybe there is also a "Context Menus" command bar(?) Enumerate Microsoft.VisualStudio.CommandBars.CommandBars to find out.
I have iterated the collection of command bars, and have also exposed them as extra menu's via the macro IDE, however I am still unable to find the context menu associated with an unloaded project.
The closest match (context menu item names) was for a SVN "stub project", but sadly none for the "context menu displayed for an unloaded project"
crosscompile...
Member
40 Points
34 Posts
Visual Studio Addin - add item to solution explorer context menu
Apr 06, 2009 12:04 PM|LINK
I've created a VS2008 addin project, and wish to add a context menu item for the following scenario: Right Clicking on an unloaded project within the Solution Explorer of visual studio.
Currently this context menu shows "Reload project, Edit {project name}.csproj, Edit, Remove".
I would like to add my own menu item here.
Can anyone help with how I can reference this menu? I can add to the "Tools" menu with:
Microsoft.VisualStudio.CommandBars.CommandBar menuBarCommandBar = ((Microsoft.VisualStudio.CommandBars.CommandBars)_applicationObject.CommandBars)["Tools"];
However I am unsure how to target the context menu within the Solution Explorer.
Any help / links / sugestions welcome.Bilf
http://www.vic-fontaine.com/
stmarti
Contributor
5083 Points
1061 Posts
Re: Visual Studio Addin - add item to solution explorer context menu
Apr 07, 2009 02:41 PM|LINK
Manually you can do this this way (maybe this helps you how to reference the context menu)
Click any tiny arrow at the end of one of your toolbar\add or remove buttons\customize\toolbars\check "context menus"\a new toolbar appears where you can customize any context menu.
Maybe there is also a "Context Menus" command bar(?) Enumerate Microsoft.VisualStudio.CommandBars.CommandBars to find out.
crosscompile...
Member
40 Points
34 Posts
Re: Visual Studio Addin - add item to solution explorer context menu
Apr 20, 2009 10:56 AM|LINK
Hi stmarti,
Sorry for the late reply.
I have iterated the collection of command bars, and have also exposed them as extra menu's via the macro IDE, however I am still unable to find the context menu associated with an unloaded project.
The closest match (context menu item names) was for a SVN "stub project", but sadly none for the "context menu displayed for an unloaded project"
Is there something I have missed?
Any help is much appreicated
http://www.vic-fontaine.com/
Mikhail Arkh...
All-Star
33139 Points
6083 Posts
Microsoft
Re: Visual Studio Addin - add item to solution explorer context menu
Apr 20, 2009 03:58 PM|LINK
Perhaps this forum will help http://social.msdn.microsoft.com/Forums/en-US/vsx/threads
------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
crosscompile...
Member
40 Points
34 Posts
Re: Visual Studio Addin - add item to solution explorer context menu
Apr 21, 2009 08:35 AM|LINK
Smashing - thank you for the pointer!
http://www.vic-fontaine.com/