Visual Studio 2022 setup for C# (theme, settings, extensions)

Visual Studio is the de facto IDE for C#. You will spend countless hours inside Visual Studio. You are better off spending some time to customize it to boost your productivity.

My Visual Studio setup is heavily inspired by De-Cruft Visual Studio. It aims to leave more space to the text editor by removing unneeded menus and bars.

These are the theme, settings and extensions I use to be more productive with Visual Studio.

1. Theme and Layout

My Visual Studio 2022 setup for C#
My Visual Studio opened with a sample Console project

2. Settings

To change your Visual Studio settings, go to “Tools” menu and then to “Options”.

On the left pane, you will find Visual Studio settings groupped by features, languages and extensions.

In “Text Editor”, unselect Enable mouse click to perform Go to Definition, Selection Margin and Indicator margin.

Visual Studio Text Editor settings
Text Editor - General settings

Next, uncheck Disable CodeLens. Only activate Show Test Status and Show C# References.

Visual Studio CodeLens settings
Text Editor - All Languages - CodeLens settings

Next, in C# specific settings, enable Line numbers. And, hide Navigation Bar and Code Outlining.

Visual Studio C# settings
C# - General settings

Go down to Advanced settings to Add missing using directives on paste. Yeap, Visual Studio can add missing using staments when you paste some code. That’s a time saver!

Visual Studio C# - Advanced settings
C# - Advanced settings

After installing “Productivity Power Tools” extension, unselect Compress blank lines and Compress lines that do not have any alphanumeric characters. Code looks weird compressed.

Visual  Studio Productivity Power Tools settings
Productivity Power Tools settings

Speaking of extensions, after installing “VSVim” extension, use Handle all with Visual Studio. This way, we have the best of both worlds. And, we still have Control + C and Control + V.

Visual  Studio VsVim settings
VsVim settings

For shortcuts, add Ctrl+Shift+w to easily close all documents from the keyboard.

3. Extensions

4. Presentation mode

Fire a new instance from Visual Studio Developers Tools command prompt, using

devenv /RootSuffix Demo

It will open a separate and clean instance with no configurations or extensions. Any changes made to this instance won’t affect the “normal” instance next time you open Visual Studio.

My Visual Studio 2019 setup in Presentation Mode
My Visual Studio in Presentation mode opened with a sample Console project

To make Visual Studio work in Presentation mode:

Voilà! That’s how I use Visual Studio 2019 for C# coding. If you’re wondering what’s Vim and why you should learn it, check my post Learning Vim for Fun and Profit.

For more productivity tools and tricks, check these programs that saved me 100 hours and how I used a Visual Studio extension and a Git feature to get rid of two recurrent review comments.

Happy coding!