20 useful Visual Studio extensions
Tags: dotnet, visualstudio, productivity
Published: 2021-04-13 22:00:30

This article is about introducing several Visual Studio extensions that boost your development productivity and make your life as a developer easier (at least they made my life easier).

##1- CodeMaid
[CodeMaid](https://www.codemaid.net) is one of my favorite extensions that without it I really cannot write code. CodeMaid features are:
- [Code Cleaning](https://www.codemaid.net/documentation/#cleaning)
- [Code Digging](https://www.codemaid.net/documentation/#digging)
- [Code Reorganizing](https://www.codemaid.net/documentation/#reorganizing)
- [Comment Formatting](https://www.codemaid.net/documentation/#formatting)
- [Joining](https://www.codemaid.net/documentation/#joining)
- [Sorting](https://www.codemaid.net/documentation/#sorting)
- [Finding](https://www.codemaid.net/documentation/#finding)
- [Progressing](https://www.codemaid.net/documentation/#progressing)
- ...

Now let's see some features in action.

CodeMaid can clean up an opened file after saving it. After installing CodeMain options:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vcxf1r8midck3l55f40n.jpg)
- In the `Cleaning` section click on `General` then check the `Automatically run cleanup on file save`.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fl6wq57m4t4qzh48b2cf.jpg)
- Again in the `Cleaning` section click on `Visual Studio` then uncheck the `Skip during automatic cleanup on save`.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ql5w8fiiab922iunao7h.jpg)
Let's save the file:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ug156knjl437vfskjbw8.gif)

After saving file CodeMaid:
- Removed unused namespaces
- Sorted namespaces alphabetically
- Removed extra blank lines

Another thing I really like is inserting a single line between properties.
- In the `Cleaning` section click on `Insert` then click on  `single line properties`.
After saving the file:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g4mwy4z2rzbfno7hifsn.gif)
Before inserting a single line between properties class was less readable.

CodeMaid can reorganize class member types in the following order:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q07f0puuvj7v58ona8we.jpg)
After organizing untidy class:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8mkmrciu0zy0ebrm7yuc.gif)

Last but not least, I'm no fan of using `#region` and I always avoid using it but if you are using region a lot, CodeMaid can add reign name to the end of the region `#endregion`:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dw5lf4x4k8bqy7y4a3eb.gif)

Watch this video to learn more about CodeMaid:
[![IMAGE ALT TEXT HERE](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8dtqtkg3o89ua8k5r4we.jpg)](https://youtu.be/M8iwCaw61Mo)

###2- Open Command Line
[Open Command Line](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.OpenCommandLine) adds a new command to the project context menu that will open a command prompt on the project's path. If the solution node is selection in Solution Explorer, then a console will open at the root of the `.sln` file.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zucrd9m8l67kxhkytaz4.png)
- You can access the command by hitting ALT+Space as well.
- You may change this shortcut in the Options Window under Environment -> Keyboard
- Look for the command ProjectAndSolutionContextMenus.Project.OpenCommandLine.Default
Most of the time I use this extension to do Git staff via command line instead of the Visual Studio Git interface.

###3- Solution Error Visualizer
[Solution Error Visualizer](https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.SolutionErrorVisualizer) adds error, warning, and message squiggles to Solution Explorer. The information is fetched from the Error List and directly displayed in the Solution Explorer tree view.  Hovering over the nodes with squiggles brings up a pop-up with the error/warning/message information.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ny7km9ahw4hib0f89asl.jpg)
You can filter the Solution Explorer to just files with warnings/errors/messages using the filter dropdown in the Solution Explorer toolbar. You can create a new Solution Explorer view, filter it down to Errors and use it as a dedicated Error window.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l74phy3o69yp4foztci1.gif)
###4- Viasfora
[Viasfora](https://marketplace.visualstudio.com/items?itemName=TomasRestrepo.Viasfora) extension adds many useful features for code (C#, C/C++, JS, VB, F#, SQL, TypeScript, Python, PowerShell, R, JSON, Fortran) as well as editing XML files.
- Rainbow Braces
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vrlrnqqpbyjqbcyk3jse.png)
- Keyword Highlighting
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6tgvlb9vel7je8et1qcp.png)
- XML Improvements
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/59q0v0pgvc9eyrok00a2.png)

###5- Add New File
[Add New File](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.AddNewFile) is for easily adding new files to any project. Simply hit Shift+F2 to create an empty file in the selected folder or in the same folder as the selected file.
- Easily create any file with any file extension
- Create files starting with a `dot` like `.gitignore`
- Create deeper folder structures easily if required
- Create folders when the entered name ends with a /
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8oud8mygptmbol69hgyo.png)

###6- VSColorOutput | Output Enhancer
[VSColorOutput](https://marketplace.visualstudio.com/items?itemName=MikeWard-AnnArbor.VSColorOutput) can change the color of a line emitted to the output window based on specified rules. The rules consist of regular expressions. Rules map to classifications which in turn map to colors.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5f6kmii1ovek1wloienr.png)

[Output Enhancer]() is an extension that adds styling to the Visual Studio output window. For now, it supports coloring for build/build order output:
- Build/rebuild result messages
- Publish result messages
- Compiler errors and warnings
- npm and bower errors and warnings 

Debug output:
- Trace warning and error messages
- "Exception thrown" messages
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pozr801ymsecn13tyi7s.png)

###7- Visual Studio Spell Checker
[Visual Studio Spell Checker](https://marketplace.visualstudio.com/items?itemName=EWoodruff.VisualStudioSpellCheckerVS2017andLater) is a Visual Studio editor extension that checks the spelling of comments, strings, and plain text as you type or interactively with a tool window. It is based largely on the spell checker extension originally created by Noah Richards, Roman Golovin, and Michael Lehenbauer.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bir57eb9p4ox4mqk6qke.png)

###8- Learn the Shortcut
[Learn the Shortcut shows](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.LearntheShortcut) how easy you can make the same action using only the keyboard. Displays the keyboard shortcut for any command that you execute to help you learn the shortcuts you need the most.
It is also helpful for presentations where you want to display to the audience what keyboard shortcuts you are using.

- Status bar
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/prj9705vjz8lw530vzgb.png)
- Output Window
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l0g6p8yico607z2752r6.png)

###9- Open in Visual Studio Code
[Open in Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.OpeninVisualStudioCode) is for those times where you have a project open in Visual Studio and you want to be able to quickly open it in Visual Studio Code.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/55rpyry2v169o4e14amv.png)

###10- Better Comments
[Better Comments](https://marketplace.visualstudio.com/items?itemName=OmarRwemi.BetterComments) is a Visual Studio extension that gives you the ability to customize the font and opacity of your comments independently of the editor's font settings. It also adds four additional comment classifications, each classification with its own customizable foreground.

- Additional comment classifications. Important, Question, Task, and Crossed.
- Customizable foreground for each comment classification.
- Customize the font settings and opacity of your comments.
- Works with C#, F#, VB.NET, C/C++, JavaScript, Python, HTML, and XAML.
- You can use your own custom tokens.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zcne41vxc1tlpe63glct.png)

###11- GhostDoc Community
[GhostDoc](https://marketplace.visualstudio.com/items?itemName=sergeb.GhostDoc) is a Visual Studio extension for developers who need to Generate XML Comments from source code using customizable templates, maintain clean and up-to-date documentation, produce help documentation in multiple formats, use intelligent source code Spell Checker in Visual Studio, and more.
GhostDoc also helps to automate the generation of clean, helpful documentation of your clean code, building it, and packaging it up all without human intervention.
- Automatically generate a starting point for your help documentation
- Visual editing for your help docs
- Produce help documentation in multiple formats
- Find auto-generated comments - edit or remove the bulk created docs
- Ensure code documentation quality
- Maintain clean and up-to-date code documentation

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ijl00kotdkbe2v0r1r1v.gif)

###12- Trailing Whitespace Visualizer
[Trailing Whitespace Visualizer](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespaceVisualizer)
will highlight and remove any trailing whitespace on any line in any editor in Visual Studio. This makes it really easy to get rid of those annoying invisible characters. 
You can very easily delete all the trailing whitespace in a file by executing the Delete Horizontal White Space command found in Edit -> Advanced or by using the shortcut key combination `Ctrl+K, Ctrl+\`.
You can change the background color easily from the Tools -> Options -> Fonts and Colors menu. The item is called "Trailing Whitespace".
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4c0m37tp6bn0yn31tcv7.png)

###13- File Icons
[File Icons](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.FileIcons) adds icons for files that are not recognized by Solution Explorer
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m2pbm3u1lrmrqziidrek.png)

###14- File Nesting
[File Nesting](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.FileNesting) automatically nest files based on the file name and enables developers to nest and unnest any file manually.
- Manually nest files
- Manually un-nest files
- Auto-nesting based on naming conventions
- Option to enable auto-nesting when files are added or renamed
- Options to specify which naming conventions to apply
- Keyboard shortcut for manual nesting (Ctrl+Alt+N)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jfg6s1cjtlwklen8gtpj.png)

###15- Bundler and Minifier
[Bundler and Minifier](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.BundlerMinifier) let's you configure bundling and minification of JS, CSS and HTML files.
- Bundles CSS, JavaScript or HTML files into a single output file
- Saving a source file triggers re-bundling automatically
- Support for globbing patterns
- MSBuild support for CI scenarios supported
- Minify individual or bundled CSS, JavaScript and HTML files
- Minification options for each language is customizable
- Shows a watermark when opening a generated file
- Task Runner Explorer integration
- Command-line support
- Shortcut to update all bundles in the solution
- Suppress output file generation
- Convert to Gulp
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nr44wuq09hm6f0wgvlfn.png)

###16- Image Optimizer
[Image Optimizer](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ImageOptimizer)
uses industry standard tools to optimize any JPEG, PNG and Gifs - including animated Gifs. It can do both lossy and lossless optimization.
Adds a right-click menu to any folder and image in Solution Explorer that let's you automatically optimize all PNG, GIF and JPEG files in that folder.
- Optimizes PNGs (uses Zopfli compression)
- Optimizes GIFs
- Optimizes animated GIFs
- Optimizes JPGs (uses MozJPEG)
- Works on single images files or entire folders
- Copy any image as base64 dataURI to clipboard
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ydv6b7hiyyiwumldte1s.png)

###17- Color Themes for Visual Studio
[Color Themes for Visual Studio](https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.ColorThemesforVisualStudio) installs additional color themes for Visual Studio.
Similar to the [Color Theme Editor](https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.VisualStudio2019ColorThemeEditor), but without the editor - just the themes.
Includes all the themes available in the Color Theme Editor, plus additional themes contributed by the community.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/92wiru6j551pcoidpjnl.png)

###18- Indent Guides
[Indent Guides](https://marketplace.visualstudio.com/items?itemName=SteveDowerMSFT.IndentGuides) displays indent and page width guides in Visual Studio text editor windows.
Guides can be displayed at the indent specified in your settings, regardless of tabs or spaces, or wherever text has been indented to. Page width markers can be displayed at a fixed location and will change color when code extends past them.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rlhuqyk44zjya79jx9jl.png)

Here are three styles of guides: solid, dotted and dashed, available in thin and thick varieties and customizable color. The default is dotted grey, as shown in the image. Each indent level can have a different style and color.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hoyx63whwk67fo349exv.png)

###19- Match Margin
[Match Margin](https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.MatchMargin) highlights all the textual matches of token at the caret location in the Editor.
As an example, when the focus is on a variable, all usages of that variable are highlighted and a marker is placed on the vertical scrollbar to indicate the position on the page where that variable is used.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mto1fg98vw28i9mxxdys.png)

###20- WakaTime
[WakaTime](https://marketplace.visualstudio.com/items?itemName=WakaTime.WakaTime&ssr=false#overview) automatically generates metrics, insights, and time tracking from your programming activity.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/66ecmokxby9lf2o6ftv7.png)

##Paid
1 - [Resharper](https://www.jetbrains.com/resharper/)
2 - [OzCode](https://oz-code.com/)
3 - [Supercharger](https://supercharger.tools/)
4 - [NDepend](https://www.ndepend.com/)
5 - [GhostDoc Enterprise](https://submain.com/GhostDoc/)
6 - [Tabs Studio](https://tabsstudio.com/)