VS2012 : where is custom toolbar command SyncWithActiveDocument? - visual-studio-2012

In Visual Studio 2012, you can create customized toolbars and edit their contents (usually button shortcuts to some IDE commands).
I would like to add the SolutionExplorer.SyncWithActiveDocument command to one of my toolbars, but cannot find it in the list of commands available for addition to the toolbar. In which category is it located? Or is it a command not supported by the toolbar system?

I don't think you can use SyncWithActiveDocument as a command - it is a manual sync that is only active when turning off "Track Active Item in Solution Explorer" in Project and Solutions -> General.
Looking at it this way, is like trying to add auto-sync to a toolbar.

Related

How to add a command to context menus in Visual Studio 2019

I'm trying to add a command to the Document Tab context menu in Visual Studio 2019 so I can go directly to the open file in the Solution Explorer. I'm aware of File Tracking. I don't want to open the folder for every file tab I click on. I'm also aware of this extension but it seems like I have to click it two, sometimes three times before it will go to the file.
I found the relevant context menu under Customize -> Commands. It's "Other Context Menus | Easy MDI Document Window". The problem is that under "Add Command" you can only add from preselected lists of commands, and they don't make things easy to find.
I can see the command I want to add under Options -> Environment -> Keyboard. It's SolutionExplorer.SyncWithActiveDocument. But I don't see any way to use it in the Customize window, or if it's there I can't find it.
You can directly add commands to a menu only from the existing VS menus.
For additional commands, you can create an intermediate command with my Visual Commander extension DTE.ExecuteCommand("SolutionExplorer.SyncWithActiveDocumen") and then add this VCmd.Command01 command to the menu.

Hotkey to open TFS Source Control Explorer in Visual Studio 2012?

Currently I have to open Team Explorer and click on Source Control Explorer as below snapshot.
I do this very often and need a hotkey for that.
What is it then?
Try with below step:
Go to Options of Tools menu
Select the Keyboard from Environment
Select View.TfsSourceControlExplorer from Show commands containing:. You can type View.TFS in the textbox to filter the list.
Enter your hotkey in Press shorcut keys => click on Assign
Hope it helps!
According to a comment that I found in the site that #Adarsh mentioned, Alt+V,E,S will open the Source Control Explorer. It's a couple extra keystrokes but it works for me!
You can use Ctrl+0,P to open the Pending Changes Window.
You can find all the shortcuts for team Explorer on this blog: http://blogs.msdn.com/b/buckh/archive/2012/06/06/team-explorer-2012-keyboard-shortcuts.aspx
Update:
In Visual Studio 2013 Ctrl+0,P doesn't seem to work to open Pending Changes, but you can use Alt-V,E,H or configure a custom shortcut in the menu Tools/Options/Environment/Keyboard.
Just wanted to share another alternative I learned. One could set an alias in VS Command Window and launch it from there.
alias sce View.TfsSourceControlExplorer
note- 'sce' is an alias of your choice. I generally abbreviate. Obvious but having a pattern will be helpful if you have many of these.
Steps:
Open command window (ctrl+alt+A)
Set the alias (the statement shown
above)
Next time you need to launch the Source Control Explorer,
switch/launch command window and type your alias name. 'sce' in the
above example.
Alt+V,E,S works for me even in VS 2015
In case you like to see more shortcuts, please visit this site
http://visualstudioshortcuts.com
IN VS 2015
Toolbar=>Team=> Manage Connections =>(window like solution explorer will open on right side) Team Explorer- Connect=> Beneath the home symbol ==> Click "Connect"=>Click "Source Control Explorer"

Shortcut to Compare to Latest Version in Solution Explorer - Visual Studio 2012

In Visual Studio 2012, in the Solution Explorer (not Pending Changes), is there any way to create a keyboard shortcut, right click context menu item, or menu bar button that does a TFS Compare to Latest Version?
Alternatively, on the general Compare dialog, is there any way to change the default selection of Type: Workspace Version to Type: Latest Version?
Basically I am looking for the easiest way to get to Compare to Latest using the fewest clicks, from the Solution Explorer.
Does setting a Tools/Options/Keyboard shortcut for TfsCompare help?
For me, this worked:
VS > Tools > Options > Environment > Keyboard > Show Commands Containing: Team.Git.CompareWithUnmodified
By assigning a shortcut key Ctrl+\, Ctrl+\ to this command ( Team.Git.CompareWithUnmodified) I can now compare my current file (the file that is open in the editor) to the previous version of the file by pressing the shortcut key Ctrl+\, Ctrl+\; no need to find the file in solution explorer, then right-click the file then select Compare.
(you can choose your own shortcut key of course)
Just a note on different behaviour:
Team.Git.CompareWithUnmodified works for me because I am using TeamExplorer in VisualStudio but I use GIT as the underlying source code repository.
Tfs.FileCompare could also work in other scenarios (i.e. if you don't use Git, but use VSTS or TFS as your source control provider).

Where is my "Recent Projects and Solutions" option?

I recently installed Visual Studio 2012, and I've been banging my head against my desk looking for missing options.
I use the Recent Projects and Solutions menu option (under the File menu) a lot in Visual Studio 2010, but don't have anything like that in Visual Studio 2012. However, my boss does, so I know there's something wrong with my install or an option I've missed.
I've casually looked through registry settings for anything like "Project" that exists in my 2010 settings but does not exist in my 2012 settings, and came up empty handed. Does anyone know how to fix this?
It looks like some part of the upgrade process just removed this menu option for me. Following nithins link to this question, I followed the instructions the author created to re-create the Recent Projects and Solutions menu item.
For posterity, those steps were (performed in Visual Studio 2012):
Under the Tools menu, click Customize...
Click the Commands tab.
Change the Menu bar selected option in the drop-down list to File.
Click Add New Menu.
Click Modify Selection, rename to Recent Projects and Solutions.
Under the Menu bar drop-down list, select File | Recent Projects and Solutions.
Click Add Command...
(The Add Command menu should appear here.)
Under Categories on the left-hand side, click File.
When the Commands list (on the right-hand side) refreshes, click Recent Project list, and click OK.
Click Close.
Happy project switching!
I had the exact same problem, but I had the sense that other menu items were missing as well.
What I did was go into Tools => Import & Export Settings, choose Reset all settings, and then select the same profile as when I installed Visual Studio. (General Development Settings.) That fixed the issue.

Which short-cut is used to bring up this interface of ReSharper?

While I am watching the demo with the following link
http://www.jetbrains.com/resharper/demos/presentation/overview/refactorings/Refactor_this_demo.htm
I saw this screenshot
http://i52.tinypic.com/2cdfntc.jpg
I would like to know how to bring up this interface within resharper 5.0?
That is CTRL + TAB. Its a visual studio shortcut for the IDE Navigator. It is just showing open files and a preview of the content in them.
You can even modify some of the aspects of this window. Check this.

Resources