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.
Related
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)
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.
The paid version of CodeRush has a feature where you can "drop a marker" in the code and later go back to them. They work like a stack, so you can drop markers (across multiple files) and go back to them in the reverse order that you dropped them.
Is there a dev studio extension that does anything similar?
If you want, you can work around this limitation (No "Drop Marker" feature in CodeRush XPress). Here's how you can do it:
Create a new DXCore plug-in via the File -> New -> Project... -> Visual C# -> DXCore -> Standard Plug-in item. Enter name if necessary and click OK.
On the next "DXCore Project Settings" accept the defaults (click OK).
Drop an Action component (DXCore section) from the Toolbox on the PlugIn1 design surface.
Select the Action component and fill the "ActionName" property, e.g. "MyDropMarker".
Create an event handler for the "Execute" event of this Action component.
Inside this handler type this code line: "CodeRush.Markers.DropSelection();" (no quotes)
Build the plug-in project.
You're almost done...
Start a new instance of Visual Studio IDE.
Press the CTRL+ALT+SHIFT+O to open the Options Dialog.
In the tree view on the left, navigate to this folder: "IDE"
Select the "Shortcuts" options page.
Click on the "New Keyboard Shortcut" button.
Press the key you would like to bind to the MyDropMarker action, e.g. ALT+Home
Select the "MyDropMarker" action in the Command combo box.
Modify the context of the shortcut if necessary (e.g. Focus\Documents\Code Editor (so it has a green tick))
Save the options - click OK.
Now you have your own feature similar to the CodeRush's "Drop Marker" feature.
There's a completely free version of CodeRush called "CodeRush Xpress" - it also has markers support.
Whenever I click on an object in the Solution Explorer, in the Properties Dialog, all I can see are the "Misc" properties, usually File Name and File Path, but I need to see the "Advanced" section. Under Tools -> Options -> Text Editor -> C#, there is a checkbox labeled "Hide advanced members". This was unchecked by default, and I've tried checking + restarting visual studio, unchecking again. Regardless, it's still hidden. I'm not even sure that this relates to Properties, but this was suggested as a solution before. How might I go about fixing this?
EDIT: I'm referring to the properties of files within the project, not the project or solution properties.
This is normally the case for projects and solutions - the properties window only has the file name and path.
Right click on the solution or project node and select Properties. This will bring up the properties pages for them, instead of the properties window (F4).
If you click on the object in the solution explorer it just shows you the Advanced and Misc properties. If you want to see all the specific properties of the object click on the object itself in the [Design] window.
check the location of folder the items are stored in if they are in folders, they have to be under the project name and not the solutionenter image description here
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.