What are your most-recommended Visual Studio preferences?

Viewed 8872

There are so many little options and settings within Microsoft Visual Studio. Which adjustments do you recommend to others?

25 Answers

Line Numbers

  • Tools > Options
  • Text Editor > All Languages > General
  • Display: Line Numbers

Visual Studio Line Numbers

Environment->General->Animate environment tools => OFF.

Speeds UI responsiveness by 82%.

I've never found dynamic help to be either dynamic or helpful, and just tends to slow visual studio down, so using regedit:

registry key:
    HKEY_CURRENT_USER\Software\Microsoft\Visual Studio\x.x\Dynamic Help
value:
    Never Show DH on F1 = yes

I'm also keen on setting the following in Options->Projects and Solutions:

  • Show Output window when build starts - checked (IMHO easiest way to spot build errors)
  • Track Active Item in Solution Explorer - unchecked (stops every project ending up fully expanded in Solution Explorer) Visual Studio Preferences

Tools -> Options -> Environment -> Keyboard

Setup a shortcut to close the active document. Ctrl+Alt+W in my case.

Gotta have the tab indention set up right.

Also, Consolas & Color Themed - white backgrounds hurt my eyes

Option Strict On

Tools > Options

Projects and Solutions > VB Defaults

Default project settings: Option Strict: On

Option Strict

Personally i hate that VS defaults to "Tab to Spaces" when you are developing in C#. This is so awkward to work with and unnecessary.

Yes, i know there are issues with Tabs but honestly, did any of you ever encounter them coding in C# on Windows?

Several have mentioned custom keybindings. Here are handy default keybinding reference posters…

Microsoft Visual Basic Default Keybindings reference poster

A high quality, print-ready PDF containing the useful keybindings for developers that choose the Visual Basic developer profile in Visual Studio 2008 or use Visual Basic Express.

Microsoft Visual C# Default Keybindings reference poster

Visual C# in Visual Studio 2008 and Visual C# 2008 Express Edition Wall chart showing useful keyboard shortcuts for Visual C# programming language.

I like Microsoft's instructions:

  1. Download and extract PDF
  2. Send to favorite full color printer/copier
  3. Hang on wall
  4. Code
  5. Smile

Set the active document you're working on to display in the solution explorer. I've seen a lot of people hunting for their current doc if the project gets too big.

Tools -> Options. Make sure show all settings is checked.

Click on Projects and Solutions.
Enable the Track Active Item in Explorer checkbox.

alt text http://img370.imageshack.us/img370/4821/trackactivedocumentqv2.gif

Environment => General => Recent files

24 items shown in Window menu

24 items shown in recently used lists

Environment => General

Show status bar ON

Animate environment tools OFF

Visible white space. (Edit -> Advanced -> View White Space)

Free Image Hosting by FreeImageHosting.net

The default color is too strong. I immediately change it to silver. (Tools -> Options -> Fonts and Colors -> Visible White Space).

Silver visible white space

On some displays, even silver is too strong, and I create a "light silver".

Free Image Hosting by FreeImageHosting.net

Window Layouts

This really isn't a setting but something I always do is back up my settings via Tools > Import and Export Settings.

I make sure to back up my window layouts for both single and multiple monitors. It saves frustration when moving from my multi-monitor setup to a single monitor for a presentation.

Not to mention, it makes it easy to get up and running on a new PC.

Fixedsys Font

Tools > Options

Environment > Fonts and Colors

Font: Fixedsys

Visual Studio font

Always show solution

Tools > Options

Projects and Solutions

Always show solution

Always show solution

I'm somewhat surprised to be the first person recommending Visual Studio Hacks for a lot of suggestions of this variety

Source View

Tools > Options

HTML Designer > General

Start pages in: Source View

Visual Studio Start pages in Source View

This applies to winform projects.

Instead of opening the form in design mode by default, you can configure VS to open the code editor instead. This is configured by right-clicking on a form in the solution explorer and choosing the "Open with" option. This gives you a dialog that allows you to specify the default option when double-clicking on a file.

Its all about Resharper ;) Gives you tons of shortcuts which are so useful I can no longer work without them. I don't get on with the intellisense though, so I've turned that off.

This is incredibly useful, allows you to write underscores with the space bar when writing long test method names.

Un-Bold Brace Matching

Tools > Options

Environment > Fonts and Colors

Display items: Brace Matching (Hilight)

uncheck Bold

Find and Replace window’s "Search Hidden Text" checkbox.

It's not really a preference but it is indispensable. It sure is frustrating when you don’t notice that it "magically" unchecked itself.

Besides, Line Numbers, the first thing I always do in a newly-installed IDE is set the Edit.GoToDefinition keyboard shortcut.

Tools > Options > Keyboard

Related