Favorite Visual Studio Shortcuts

Here is a list of Visual Studio Community Edition shortcuts that I use.

Building Solution

NameShortcut
Build SolutionCtrl+Shift+B
Run Code Analysis on SolutionAlt+F11

Building Current Project

There is no default shortcut for building the current project or running code analysis on it. You can go under the Build menu and select to build just the current project but this is a manual step that requires you to navigate through the menus.

To accomplish this, I set the keyboard shortcut Ctrl + \ .

  1. Tools -> Options -> Keyboard or Ctrl + Q, type Keyboard, and hit Enter
  2. Set shortcut for Build.BuildSelection.
  3. Open a file and Ctrl+\ should now build that project

Run Code Analysis on Current Project

You can also run code analysis on the current project like you can on the whole solution.

To accomplish this, I set the keyboard shortcut Ctrl+Alt+\

  1. Tools -> Options -> Keyboard or Ctrl + Q, type Keyboard, and hit Enter
  2. Set shortcut for Build.RunCodeAnalysisonSelection.
  3. Open a file and Ctrl+Alt+\ to run the the code analysis for the project

Debugging

NameShortcut
Start DebuggingF5
Start without DebuggingCtrl+F5
Toggle Breakpoint On/Off for lineF9
Run to Cursor and then stop like there is a breakpoint on that lineCtrl+F10
Step Through the Code Line by LineF11
Modify what the debugger displays for an objecthttp://tinyurl.com/vsdebugattrib

Searching

NameShortcut
Quick SearchCtrl+Q
Find in FilesCtrl+Shift+F
Next Search ResultF8
Previous Search ResultShift+F8
NameShortcut
Go To DefinitionF12
Ctrl+Click with Productivity Power Tools
Close All DocumentsAlt+W,L

Visual Studio Windows Layout

In Visual Studio 2015, you can now save the Windows Layout and change them with a shortcut key.

  1. To Save: In Visual Studio 2015, under the Windows menu, click the Save Windows Layout
  2. To Apply Layout: In Visual Studio 2015, under the Windows menu, select the Apply Windows layout popout and pick the layout to apply. There is also a shortcut key for each of the saved Windows layouts. By default it is Ctrl+Alt+# (e.g. Ctrl+Alt+1 for the 1st saved layout)

If you have Visual Studio 2013 and below, you can use use the Visual Studio extension, Layouts O Rama

Resharper Searching/Navigation

If you have Resharper there are several additional options that you get for searching.

Note: Assumes Visual Studio keyboard layout for Resharper

NameShortcut
Go to EverythingCtrl + T
Go to FileCtrl + Shift + T
Go to Member in FileAlt + \
Find Current File In Solution ExplorerAlt + Shift + L

Format Document

NameShortcut
Format DocumentCtrl+K,D
Resharper Format DocumentCtrl+E,F
Note: Assumes Visual Studio keyboard layout

Additional Shortcuts

There are a lot more shortcuts that are set in Visual Studio. I have only covered the ones that I use the most. To see the full list, visit http://visualstudioshortcuts.com.

Series Post

Dialogue & Discussion

back to top 