How can I add an addin in visual studio 2008 by menu item - visual-studio

I want to write some addin in vs2008 to help me do some repetitive work. And I want to see my addin in the menu item when I right click my class name in editor. And who can tell me hwo to add my addin in the menu.
Thanks

See Adding buttons, commandbars and toolbars to Visual Studio .NET from an add-in for detailed explanation. Basically you need to call Commands.AddNamedCommand to create your command and then call myCommand.AddControl(CommandBars["Code Window"]).

Related

How to add action to Visual Studio Solution Explorer?

Please let me know how to add an action into the context-menu of "Solution Explorer" in Visual Studio?
I'd like to add my action into the context-menu of files listed in this explorer (see a screenshot for example), and then be able to launch my application (EXE file) that can get the filename (including its path) as an argument.
I currently use VS2008, however please let me know if that should be different with VS2010 and VS2012.
THANK YOU
Write your own visual studio Add-In take a look at that link this is good place to start. but its not easy...
You're going to have to write a Visual Studio Add-In.
Take a look at the code for the Xsd2Code addin on codeplex. Specifically the Connect class. This addin does something similar to what you want... it adds a context menu option that's available when you right-click on project items (in this case, only enabled for .xsd files).
Also, check out the Solution Explorer Context Menu sample within the Visual Studio 2005 Automation Samples download.

Split button in a tool window toolbar

i'm writing a visual studio 2010 extension and got a ToolWindow with a ToolWindowToolbar.
in my toolbar i want to add a split button that while pressing the button (left part) will show the 'open file' dialog, and when pressing the arrow (right part) will show a list of recently opened files.
i have tried several ways to no avail, can you help?
This thread from MSDN Visual Studio Extensibility Forum might help you.
"Bitmap icon does not appear on a SplitDropDown button in Visual Studio toolbar"
see solution in this discussion

Adding context menu for VS 2010 Add-In on loading

I'm creating an Add-In for Visual Studio 2010.
I want to add the context menu item to the tab during Add-In loading
(in OnConnect method of the Add-In):
I do know how to add the menus using CommandBars.
I already added commands into "Tools" and "Solution Explorer" menus.
I just cannot find the CommandBar responsible for the menu, I need.
Can anybody help me?
Solution found.
You can enable logging of chosen menus.
Details:
http://blogs.msdn.com/b/dr._ex/archive/2007/04/17/using-enablevsiplogging-to-identify-menus-and-commands-with-vs-2005-sp1.aspx
http://blogs.msdn.com/b/dr._ex/archive/2007/04/17/using-ivsproffercommands-to-retrieve-a-visual-studio-commandbar.aspx

Extending VisualStudio

I want to extend Visual Studio such that, when someone right clicks on Solution Explorer, context menu should have a new menu item, say "Open custom form", clicking which should open a form (this form would actually accept some settings and modify config file accordingly)
Q1. Please provide on where should I start for such extension. Couldn't find any reference/tutorial link :(
Q2. What technology can be used to make such a form - Winforms/WPF?
Either Windows Forms or WPF should be fine.
SO: Visual Studio Add-In - adding a context menu item to solution-explorer
Google Code: explorer-popup-add-in
There's a lot of docs on Visual Studio integration here

How to access selected project in Solution Explorer from a Visual Studio Add-In?

I developed a VS 2008 add-in and added a custom menu item to context menu for "Project" nodes in Solution Explorer.
This allows me to right-click any project in solution and perform a custom operation on that project. Or at least, it would, if I knew how to access the selected project from my Click event handler.
Can someone with more experience please help me?
I think what you're looking for is DTE.ActiveSolutionProjects.

Resources