Where is the Sync with active document button in Visual Studio? - visual-studio

Where is the Sync with active document button in Visual Studio?
I know that I can press Alt + Shift + L and I will get the Sync with active document.
I also know that I can enable in the Options the feature to work every time I focus on another file.
But I can not find a button in the VS interface to do that. Is it even present? I would expect such a button be somewhere in the top of the interface of the VS. Somewhere near the comment/uncomment buttons (that is just my feeling that it is there, I have no proofs or reasons to think so).

I know this might sound silly, but I spent about a day trying to figure out where the button went in the latest VS2019 (Version 16.10.2) update.
After one complete day of using the keyboard shortcut instead, I realised that the Icon has changed to a different Icon.
Note: The Track Active Item in Solution Explorer checkbox should be unchecked to see this Icon, as posted by #Sandro Stadler.

Pretty simple.
If you check this option, the document and solution explorer will be automatically synchronized and the icon will be hidden.
Deselect to show the icon in the solution manager.

In VS 2019 it is in the Solution Explorer window:

Related

Enabling/disabling bookmarks in Visual Studio

My bookmark window looks like this:
Yesterday though suddenly and out of nowhere there were one check box at the left of each bookmark. Until then I didn't know (or didn't care) that you can enable and disable bookmarks in Visual Studio (2012).
Today the checkboxes are gone. :-( I can still enable and disable them via the menu option Edit -> Bookmarks -> Enable Bookmark. I could assign this function to a shortcut key combo, I guess.
But how can I get the check boxes back?
Update: The same applies to VS2013.
Update: ... and to VS2015.
Update: Also to VS2017.
From my point of view this is a VS-Bug.
My CheckBoxes are also "away" or better seems to be away. When you click the position where the CheckBox actually is it still works.
Means: When I click left to the bookmark "flag" (where check box normally is) the bookmarks still can be enable/disabled.
This has been fixed in Visual Studio 2015 Update 3.
BTW: This is the original thread in connect.microsoft:
Bookmark Window: Checkbox for enabling/disabling bookmarks is invisible

Customizing toolbar items in VS2010

Has the menu & toolbar customization functionality in VS2010 been reduced?
I can't seem to be able to select an icon for an added command, nor set it to be icon-only. Previous versions of Visual Studio supported this functionality and even allowed the creation/editing of custom icons.
Is this something that has suffered as a result of the move to the WPF-authored UI or am I missing something?
Seems like this functionality was cut from Visual Studio 2010. This post has some info in the comments: Customizing Visual Studio 2010
Specifically - "Unfortunately assigning or editing icons to commands through Customize dialog is not possible in VS2010. It is one of the features got cut for lack of time. This is however something we'll consider adding back in next version."
The reply also has a longer explanation of a workaround.
As noted in the link mentioned in the answer from #Gordon Mackie JoanMiro, the REASON for the reduced functionality is that the VS Shell team migrated the entire UI (shell and command system) from Win32 to one based solely on WPF. This was a gargantuan task, I would imagine. However, a couple workarounds are now available:
You can export previously saved settings from VS 2008 and import them into VS 2010. That includes command bar customizations (as noted by #Don)
A more recent blog-post contains detailed instructions for using a new extension to VS2010 (available on Visual Studio Gallery) that allows users to change the images on the command UI. (Note that the old drag&drop customization interface is still not supported in this new extension.)
If you have custom icons, any attempt to make ANY changes to the tool bar will result in the custom icons disappearing and being replaced by text when you restart VS2010.
The only way I found to get my custom icons without text into VS2010 is to open VS2008, set up all of the tool bars the way I want, including custom icons, then export the settings (Tools| Import and Export Settings). Then open VS2010 and import those settings. Tedious, I know, but it allows me to have a down arrow icon that searches for the next instance of the word my cursor is on.
I have been trying to customize VS2010 toolbars/keyboard and what took a few minutes in previous versions takes hours now. The new system looks real pretty but is useless in practice. Apart from the fact you just can't do (like change the appearance of buttons as mentioned above) the things you can do are extremely time-consuming and annoying.
Why is it every new version of VS loses something really useful? Other examples:
VC++5 introduced a new HTML help system. Pressing F1 on a function name used to immediately show help for that function. After VC++5 getting context help became annoyingly much slower, and is still very slow (and inaccurate).
VS.Net (aka VS2002 or VC++7) had a useless bookmark system compared to VC++6. VS2010 bookmarks are better but not perfect.
VS.Net removed the search state buttons "whole word", "case sensitive" etc. These were possibly the most useful buttons ever as they quickly allowed you to see why a search may have failed.
I found a great extension: CommandingImage
It does not have an icon editor, but you can create your images as 16x16 png format (for transparency) and import it (I recommend Paint.Net)
Dave, here's how to add toolbar buttons:
1) in the IDE, find the down arrow looking thing on the far right of a toolbar and click on Add Remove Buttons, Customize
2) in the Customize window select the Menu Bar radio button then select the appropriate menu bar that you want to add a button to
3) click the "Add Command..." button
4) select the appropriate Category and Command button that you want to add, then click OK.
The command button you selected will be added to the menu bar you selected. You can move the button up or down.
I think this is what you are looking for.
Good luck!

Accidentally Deleted 'Tools' Menu in Visual Studio

I was messing around with my toolbars and menus in Visual Studio 08. I noticed that they were behaving strangely. When I closed the "Customize" dialog, my 'Tools' and 'Help' menu were gone (perhaps more, I can't remember what else was there). I don't want to reset everything, as I have been curtailing the VS environment to my exact liking for over a year now, and I have never saved those settings. I have lots of custom commands quirk fixes all around. I don't relish starting over. I guess the lesson is that I should be saving my settings regularly.
Does anyone know how to get the menus back? I didn't even know it was possible to remove the actual menus (not toolbar items)!
Thanks,
Ryan
You could try exporting settings from a clean install, find the section with the menus and only import those? I believe the settings file is registered to visual studio so double clicking it should start the import process.
Not to mention, this would become good practice for exporting and backing up your own settings...
Try to right click on a toolbar click on Customize. Then you can select Menu Bar and click on reset. Not sure if it will work, but it's worth a try.
You can reopen the toolbar by going to "Window > Reset window layout".
I've only tested it with VS 2019.
BUT, IDK if that's what you're asking about...

Eclipse's tab double click on Visual Studio?

On Eclipse, whenever I double click a tab, it fills the workspace (by hiding all other views like project tree, console, etc).
Is there any way to do this on Visual Studio?
Note: i'm not looking for full screen, just want a way to declutter the workspace but still have access to menus.
Are you after this?
Set shortcuts for the Window.AutoHideAll function and for the Window.ResetWindowLayout function. In order for the ResetWindowLayout to work, you have to export your settings (make sure you select "All Settings") with all windows expanded and then import them again.
ResetWindowLayout will restore all windows to the way they were the last time you imported your settings.
Not with double click on tab, but you can do the same with Shift+Alt+Enter key combination.
This keyboard shorcut was changed to F11 from 1.9.1 vscode version.
All keyboard Shortcuts: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf
I was looking for that, as well, and I now just got used to using full screen (Shift+Alt+Enter), which hides a little too much, which you seem to think, as well, but does in fact still show the menus.
Looks like drby got it on this one. Just FYI. I pinged the VS team to ask about this and here is the response:
"There is no way to reverse the command automatically. For it to work as a toggle we would need to save which toolwindows were auto hidden and which ones were not when the command was run, which we don’t do (it would cause lots of interesting persistence questions, across profiles and VS sessions)."
The idea of a "Unhide All" command is what I suggested. So if you hide all then you can unhide all as well. There might be some windows you don't want to unhide but the 1 or 2 extra windows is better than not having an unhide IMHO.

Visual Studio 2008 -- Can I change which "add reference" tab is selected by default?

Every time you start Visual Studio, the first time you click "Add Reference" to add a DLL reference to a project, by default, the .NET tab on that dialog box is selected. As most people reading this have probably noticed, it can take a long time -- often more than 30 seconds -- for the full list of .NET components to fill in.
Because of the way we're designing our solutions, though, about 80% of the time, I want to select either from the "Projects" tab or from the "Browse" tab.
Is there a setting anywhere in Visual Studio that will let me make "Projects" be the first tab that loads up? Does anyone know any other, hidden tricks to accomplish the same effect?
I use this tip to do this in a different way. Open your Object Browser (Cntrl + Alt + J). Change Browse dropdown to "My Solution". Select the project you want. On Toolbar, click "Add to References in Selected Project in Solution Explorer".
A neat work around which has saved me many hours.
If you have the PowerCommands for Visual Studio 2008 installed, there is functionality to copy-paste references between projects, as well as copy-paste individual projects as references, all without opening the references dialog.
I have never found anywhere that allows you to change the default tab. And yeah, it's annoying how long that window can take to load. I think this is something that we just have to live with.
Tuna Toksoz has created a Fast Add Reference dialog plugin for Visual Studio.
http://devlicio.us/blogs/tuna_toksoz/archive/2009/06/18/vs-addin-fast-add-reference-dialog-no-more-coffee-break.aspx
Another tip you might consider is that if you reference a type in another project, ReSharper will notice it and offer to add it to your references for you.
With this, I never visit that tab unless I have file dll references to add.
I am afraid the answer, as far as I can tell, is no. I even took a trip through the registry to determine if there was someway to reorder the tabs. You might be able to do it with a hex editor but I would advise against that.

Resources