Solution Explorer Project Context Menu - visual-studio

Is there a way of adding other options (specifically Add Interface) to the projects right click context menu (Right Click a project > Add > [Class, new Item, new form,...])?
I found one option in the customize dialog to place an 'Add Interface...' item in, but this is always disabled. I found that one under the Projects category of menu customization, so i assumed it would work...
Any ideas?

I'm currently trialing ReSharper, and that has it's own set of Create New context menu entries (which are key bindable), and these support everything I am after.
The ReSharper "Create New" dialogue is a lot faster to respond than the in built Visual Studio one too.

Related

How do I modify the "Add" sub menu items in solution explorer?

How can I modify the items that appear in the solution explorer "Add" context sub menu? Currently there is New Item, Existing Item, New Folder, then Windows Form, User Control, then Component and Class. I especially want to get rid of the 2 WinForms items and replace them with their WPF counterparts. How do I do that in the easiest way?
You can modify the Add sub menu you get when you right click on a project item from the Tools->Customize... menu:
click on the Commands tab
pick the 'Context Menu' radio button
select Project and Solution Context Menus | Project | Add from the combo box
From here you can modify the context menu.
This is not, however, what you want to do in your particular case.
The WPF commands you want are already in that context menu; you'll see WPF commands like "Add Window" and "Add Page" already present in the Customize dialog if you go through the instructions above. The reason that you don't see them in the actual context menu is because Visual Studio is trying to be smart and it thinks that you're developing a WinForms app and not a WPF app. If it thought this was a WPF app, you wouldn't see the windows forms option (and the user control option would create a WPF user control).
In order to correct visual studio's incorrect assumption, you could make a new project - make sure you pick that you want a WPF app - and add all of your existing files, or you can edit your .csproj file: see my answer to this SO question.

Hide items in the right-click context menus in Visual Studio 2010 (08)?

The right-click context menus of the source editor, the project items and the solution item, is getting ridiculously long, and two of them even have scrolling now on my 1680x1050 screen.
Is there any way for me to hide items on these menus, even if I have to add an event to my Visual Studio macro-system and find and hide them manually?
Here's examples, many of these items I never use:
Edit1: The current answer + comments suggest I should use the Customize menu item in the toolbar context menus, go to the second tab, Commands, and use the Context Menus radio selection and find the relevant menus there.
Here are 3, which are suggested by comments:
As you can see, they're all empty.
Edit2: After clicking the "Reset All" button in that dialog, for the Solution and Project menus, I got items in the dialog, that I could edit, but the changes did not affect the actual context menu on either a project or the solution file. Also, after restarting Visual Studio, the dialog contents for those two were again empty.
In Visual Studio 2010 you can:
Goto Tools->Customize
Select the Commands tab
Select the Context menu radio button
Select the appropriate context menu from the dropdown list to the right, and delete away
I believe Visual Studio 2008 is similar.
You will need to choose the correct context menu in the Customise option.
Go to Tool > Customise,
Then choose the Context menu as you did in your Edit1 screenshots but choose "Editor Context Menus | Code Window" from the dropdown menu instead.
From there you should be able to delete whatever command you don't need from your context menu. Next, for the other commands that can't be found in Editor Context Menus | Code Window (mostly plug-ins or extensions related commands) you will have to go through other categories.
For example, I am using CodeMaid and when I right click a file in Solution Explorer the context menu below are shown
In order to remove the 'Cleanup Selected Code' command I will have to choose the Project and Solution Context Menus | Solution Folder dropdown option.
Added: Here is my sample reduced context menu (removed Copy, Cut, Paste, Outline Menu and Create Snippet...)
Hope this helps =)
Edit: In case you want to add back the commands you removed you can either add them back using New Command... or just press Reset All. Keep in mind the later will restore all the commands. Thus unless you are really having trouble finding the removed command use the first method.
I use 3 VS extensions and these 3 are responsible for polluting the context menu:
VSCommands
Power Commands
Power Toys
Using their own options dialogue, it's possible to subject showing those menus to pressing CTRL (in VS Commands) or completely disable them (the other 2 extensions)

Visual Studio: Context Menu on Solution Explorer too long, can I add a sub menu or a toolbar above solution explorer?

My context menu on my solution explorer is way too long, although I am not complaining, this is due to the fact that I have a lot of extensions installed. Most commands I can find... but there is one pesky command that always is difficult to spot and I use it all the time.
"Set as Startup Project"
Is there a way (or an extension) that allows me to add a sub menu to the context menu for commands I use regularly or an extension for adding a toolbar on the solution window?
It doesn't require an extension, you can alter the menu to your heart's content without coding. Use Tools > Customize > Commands tab. Click the Toolbar radio button and select "Context Menus | Project and Solution Context Menus | Solution". You should see your too-long context menu. Move a favorite command in a better spot with the Move Up button. Use the Add New Menu button to add a sub-menu.

Solution Explorer Context Menu Too Long

Ok, so I installed plenty of useful extensions from Extension Manager in Visual Studio 2010.
I really like them but now my context menu in solution explorer is way too long.
So long in fact that I have to scroll down/up using little arrows which is really annoying.
Any solution to that anyone?
The problem is that when you right-click on an entity within the Solution Explorer, the resulting context menu is so loaded down with options, extensions, menus, lists and levels that you have to start scrolling around to get anywhere.
The solution is to declutter that context menu by removing unneccessary items. This can be achieved through the Commands tab of the Tools -> Customize dialog. Specifically, click on the Commands tab, and select the Context Menu button to start customizing anything and (almost) everything to do with those context menus.
Many of the entities within the Solution Explorer have some sort of representation here; the biggest issue you have will be finding the right place to start customizing.
For example, I have a method of Source Control integrated within the Visual Studio environment which causes 7 new menu items to appear when I right-click on a project (Check In, Check Out, Get Latest Version, etc). I do all of my source controlling outside of Visual Studio, so these menu items are just clutter to me. I go to Project and Solution Context Menu | Project and delete anything and everything related to Source Control. Now, when I right-click on a project, none of those options appear in the menu.

Customize project context menu of visual studio

I'm using Visual Studio 2010 with some add-ins and extensions. The problem is now that the context menu of the project items in the solution explorer is getting so large that I always have to scroll down for the "Properties" and the "Open in Windows Explorer" which I use most.
This is getting very nasty.
Is there a possibility to group commands into a sub menu or to modify the position of the commands in the context menu?
Yes, it can be edited.
Go to 'Tools' -> 'Customize...' -> and select the 'Command' tab.
Select Context Menu and pick Project and Solution Context Menus | Project
You can always use the keyboard to do the work for you.
The default binding for Properties is Alt+Enter (or sometimes F4 depending on what add-ins you have installed). Select the project in Solution Explorer and hit Alt+Enter to show it's properties. (This works for almost any other object as well, btw).
The default binding for view SolutionExplorer is Ctrl+Alt+L, so you don't have to use your mouse to get there.
There is no default binding for opening a project in Windows Explorer, but you can set one yourself.
The keyboard bindings are set under Tools->Options...->Environment->Keyboard, and the interesting settings in this case are probably View.SolutionExplorer, Project.OpenFolderinWindowsExplorer and View.PropertiesWindow or Project.Properties depending on which propertiy collection you were referring to.

Resources