Favorite Visual Studio Shortcuts

productivity/ visual studio

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

Building Solution

Name Shortcut
Build Solution Ctrl+Shift+B
Run Code Analysis on Solution Alt+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

Name Shortcut
Start Debugging F5
Start without Debugging Ctrl+F5
Toggle Breakpoint On/Off for line F9
Run to Cursor and then stop like there is a breakpoint on that line Ctrl+F10
Step Through the Code Line by Line F11
Modify what the debugger displays for an object http://tinyurl.com/vsdebugattrib

Searching

Name Shortcut
Quick Search Ctrl+Q
Find in Files Ctrl+Shift+F
Next Search Result F8
Previous Search Result Shift+F8
Name Shortcut
Go To Definition F12
Ctrl+Click with Productivity Power Tools
Close All Documents Alt+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

Name Shortcut
Go to Everything Ctrl + T
Go to File Ctrl + Shift + T
Go to Member in File Alt + \
Find Current File In Solution Explorer Alt + Shift + L

Format Document

Name Shortcut
Format Document Ctrl+K,D
Resharper Format Document Ctrl+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.

Share Post: