What happened to the Members/Methods combobox in Visual Studio 2010? - visual-studio

In Visual Studio 2008, I can see a combo box containing the members/methods defined in my class at the top of the code window:
However, I cannot see this in Visual Studio 2010! Was it removed? Can I get it back?

It's still there, you must have just inadvertently turned it off. To turn it back on, follow these easy steps:
From the "Tools" menu, select "Options".
Expand the "Text Editor" heading.
Select your language of choice (e.g., C# or VB.NET).
Check the box labeled "Navigation bar".

Related

Shortcut button for remote debugging in Visual Studio

I want to add a shortcut-button in Visual Studio 2015. Clicking this button should just emulate "Attach To Process" -> Select "w3wp.exe" -> Attach.
Does anyone know how to do it?
You can't do those two commands on one toolbar button click apart from creating or using an existing Visual Studio extension.
Creating a Visual Studio extension would be feasible but somewhat involved (as a complete project in itself).
Available Extensions:
The first extension you could use is Visual Commander (detailed below) to create a Macro.
Depending on your needs you could also use AttachTo which provide a one click option to attach to IIS.
Finally there is also Debug Attach Manager which can attach to specific process and then remember it.
Using a macro to achieve the desired effect:
As mentioned by #Sergey Vlasov, you can can install a Visual Studio Extension named Visual Commander that brings back Macros in Visual Studio. Then you can program a macro to do this for you. The code for the macro comes from another SO answer
Public Sub AttachShortcut()
For Each proc In DTE.Debugger.LocalProcesses
If proc.Name = "what you're looking for" Then
proc.Attach()
Exit Sub
End IF
Next
End Sub
Adding the shortcut button:
You can also easily add a button in your toolbar to add "Attach to Process..." if you prefer to have the button on your toolbar.
To do this go in the Menu under TOOLS. Then choose Customize.
There select the second tab "Commands".
The select Toolbar and choose the toolbar you want the button to appear in. For example "Debug" if you want it to appear during debugging.
Then press the Add Command... button and choose the Debug category. There you will find the Attach to Process.
This would make it more readily available if you prefer to use the toolbar.

Visual Studio 2013 Express Toolbox empty

I am trying to learn Visual Basic with the guidance of some YouTube Tutorials. They have recommended the use of Microsoft Visual Studio Express 2013 as it has a built in compiler. I encountered a problem where my toolbox bar on the left of my screen is empty. Does anyone know how to fix this?
http://gyazo.com/328ade3754613c971dd6d4745a0ed171 This is a link to my screenshot.
Just right click inside tools and click on "show all"
Your code may be running. Make sure to stop all processes and view the toolbox again.
On Visual Studio C++ 2012, it also happen sometimes. Try, to right click inside the Toolbox dialog and click on "Reset Toolbox" item. It should solve your problem.
See same question: How to rebuild the Visual Studio Toolbox?
What you need to do is to open your code in [Design] view. In this view you don't see the code as text, but rather as windows and buttons and so on.
Choose your favorite way to switch to the [Design] view :
A. View > Designer
B. Shift + F7
C. In the Solution Explorer window double click Form1.cs
Source:
How do I open a Visual Studio project in design view?

Adding a Visual Studio toolbar button for a command that is only available as a keyboard shortcut

This question relates to this ReSharper YouTrack issue.
In Visual Studio 2010 with ReSharper 7.1.1 installed, if I go to Tools > Options > Environment > Keyboard, there is a command called ReSharper_SilentCleanupCode.
I would like to bind this command to a toolbar button.
This seems to be impossible using Tools > Customize > Commands because the only commands available within this dialog are for actions that already have an associated menu item. The particular ReSharper command I'm interested in (Silent Code Cleanup) doesn't appear in any menu, so it cannot be assigned to a toolbar button using the "GUI".
Is there any other way to bind a keyboard-only command to a toolbar button? (One of ReSharper's programmers thought the "VS script editor" could be used, but I'm not having any luck finding info on this.)
Edit
I should have mentioned this in the first place. While azhrei's macro solution is great for Visual Studio 2010, it will break once I upgrade to VS 2012, because macros are no longer supported. If someone has a solution that will continue to work in VS 2012, that would be preferable. (Or perhaps VS 2012 toolbars don't have the same limitation in the first place?)
Add a macro that executes the command, then add the macro to a toolbar.
This works because it makes the keyboard-only command appear in the Macros menu in the Customize Commands dialog.
Details
Add a macro which does this:
Sub _ReSharper_SilentCleanupCode()
DTE.ExecuteCommand("ReSharper_SilentCleanupCode")
End Sub
Put this macro in a module which appears in Customize..Commands..AddCommand..Categories..Macros, such as Samples or MyMacros.RecordingModule, but not MyMacros.Module1 (the default when using the macro IDE).
Go to Tools..Customize..Command and select the Toolbar you want.
Now Add Command... and select the Macros category.
Select your Macros.Samples._ReSharper_SilentCleanupCode macro.
Click Modify Selection and change the name to #-) or whatever text makes you think ReSharper Silent Code Cleanup without being too long for your toolbar. :-)
I tried this with Visual Studio 2010 and ReSharper 7.1.2.
Edit
Visual Commander is a apparently way to get this going on VS2012 as well - see comments below for more.

How to open new doc tab labels on the right side in Visual Studio?

When I open a new doc, its tab label appears on the left side of the bar. How can I make it appear on the right?
For Visual Studio 2012 and later, this setting has moved to the "Tabs and Windows" section.
Updated directions are:
Click on the "Tools" menu, and select "Options".
Under the "Environment" heading in the listbox on the left, click on the "Tabs and Windows" item.
Check the box labelled "Insert new tabs to the right of existing tabs". This should be the first checkbox in the panel, in the "Tab Well" section.
To instruct Visual Studio that you want new tabs opened to the right of existing tabs:
Click on the "Tools" menu, and select "Options".
Under the "Environment" heading in the listbox on the left, click on the "Documents" tab.
Check the box labeled "Insert documents to the right of existing tabs".
In Visual Studio 2015, this option has been moved to Options --> Environment --> Tabs and Windows.
In Visual Studio 2019, this option is still under Tools->Options->Environments->Tabs and Windows, but it has been moved down. It is now placed under Group tabs by project/path:
In Visual Studio 2017 is the same like in Visual Studio 2015.
Tools->Options->Environments->Tabs and Windows
You mus check "Insert new tabs to the right of existing tabs"

Per-filetype "View whitespace" setting in Visual Studio

Is there a way to enable/disable the "View Whitespace" feature in Visual Studion on a per-filetype basis? I'd like to be able to edit python files with visible whitespace, but not other types.
Unfortunately, there is not a way to do this. The 'View White Space' setting (available from the Edit|Advanced|View White Space' menu option) is stored in the registry, which means the setting is applied to all files and all sessions of Visual Studio.
The next best thing is learn the shortcut key and toggle the feature on and off as necessary. For Visual Studio 2008, the shortcut is Ctrl+E, S.

Resources