Remember when we used to code in notepad? Those days are long, long gone. Now we have intellisense, syntax highlighter, code completion, linked navigation, drag-and-srop, code repositories, live debuggers... it can make your head spin. Though somehow, order comes out of chaos and perfect harmony is achieved with hundreds of thousands of lines of code shared worldwide with millions of coders. Quite a matrix we have developed!
I actually started coding in ASP.NET using notepad. I just could not trust the IDE's, especially Visual Studio, because they made so many assumptions and worked too much without me knowing. I felt my code was running away from me. As years went by and code became more complex, I learned to use Visual Studio instead of allowing it to use me!
Now with Visual Studio 2010 fully baked and in mainstream use, I wanted to write about the useful extensions for it that unleases new dimensions of power in how you code. It really has made my coding life smoother and more enjoyable.
Check out my list below. Best part is that they are free!
-
Productivity Power Tools
[link]
This is one of my favorite extensions. It adds subtle improvements to Visual Studio that really deserves to be released by Microsoft themselves. Here are some of the things it does:
- Solution Navigator
Solution Navigator is a new tool window that acts like an enhanced Solution Explorer. You can do things like expand code files, preview images by hovering, view code info hovering, filter your solution, and more. In other words, it merges functionality from Solution Explorer, Class View, Object Browser, Call Hierarchy, Navigate To, and Find Symbol References all into one tool window! - Tab Well UI
This extension allows you to completely customize the behaviour of your document tabs. Some noticeable features are pinning tabs, show close button in tab, and sort by projects. - Searchable Add Reference Dialog
The new Add Reference dialog makes it faster and easier for you to find the reference that you are looking for and add it to your project. - Auto Brace Completion
Automatic Brace Completion improves the productivity of writing code by automatically inserting the closing code construct when the opening construct is typed. More specifically, this extension:
- Supports the following constructs: (), {}, [], <>, “”, and ‘’.
- Allows you to press to navigate past the next enclosing brace
- Allows you to automatically complete a statement in C# by inserting the closing semi-colon and moving you to the next line with SHIFT + ENTER
- Ctrl + Click Go To Definition
This extension gives the editor a web browser by adding clickable hyperlinks to symbols in your code as you hold down the Ctrl key. I use this feature a lot!
What is great is that you can enable or disable the features you want. Some features were personally annoying to me which I gracefully disabled: Align Assignments, Column Guides, Fix Mixed Tabs, Highlight Current Line.
-
PowerCommands
[link]
A set of useful extensions for the Visual Studio 2010 adding additional functionality to various areas of the IDE. The features that stand out are:
- Remove and Sort Usings on save
The Remove and sort usings option automatically removes unused using statements and sorts the remaining using statements in the document being saved. - Copy Path
This command copies the full path of the currently selected item to the clipboard. It can be executed by right-clicking one of these nodes in the Solution Explorer. It can be useful when adding CSS, images, and Javascript paths to your solution. - Extract Constant
This command creates a constant definition statement for a selected text. This command can be executed from the code editor by right-clicking selected text. - Close All
This command closes all documents. It can be executed from a document tab.
You can disable any feature you want. The feature I disabled was "Format document on save" since that tried to change the way I formatted my code.
-
Resource Refactoring Tools
[link]
This is an immensely useful extension! This gives you an easy way to extract hard coded strings from the code to resource files. It is really well thought out. It will allow you to select the resource file, a preview window to show changes, finds other instances of the text being replaced in the project automatically, lists existing resources by their similarity level to the text being replaced, and automatically replaces hard coded string with a reference to resource entry.
-
GhostDoc
[link]
You are documenting your code right? Right?! I know, I get lazy too sometimes. This extension will help you automatically generate XML documentation comments for methods and properties based on their type, parameters, name, and other contextual information.
-
AllMargins
[link]
This is a compilation of several extensions. The extensions it includes are:
- CaretMargin
This extension adds a margin to the OverviewMargin that shows the location of the caret and all words that match the word the caret is on. You will see colored rectangles drawn that correspond to the location of the caret and all words that match the word the caret is in or adjacent to. - OverviewMarginImpl
This extension creates a margin displayed along the right edge of the editor. It, like the vertical scroll bar, logically maps to the entire file. By default, it acts as if all elided regions are expanded (though the portions of the file contained in a elided regions are highlighted). The OverviewMargin also can highlights the portions of the file that are above, contained in and below the text shown in the editor. - Structure Adornment
This extension displays vertical lines in the editor to help show the block structure of the code file. Different colors are used to indicate different types of blocks. I diabled this feature though because it is not very subtle and made my code hard to see. - StructureMargin
This extension adds a margin to the OverviewMargin that shows the block structure of the code file. Different colors are used to indicate different types of blocks. Moving the mouse over the structure margin will create a tooltip that provides some context on what is in the file at that location.
-
Hide Main Menu
[link]
The main menu collapses when not in use (using the same behavior as Windows Explorer and Internet Explorer). To use the menu, simply press and release the Alt key, or press and release Alt+ to directly show a menu (e.g. Alt+F to show the file menu). The menu bar will automatically hide again once you're finished using it. It buys some space for your coding area.
-
Project Linker
[link]
You may already know that you can create a link to another file so you can maintain just one code file. However, Project Linker takes it one step further. It automatically creates and maintains links from source projects to target projects for sharing code that is common between your target versions. Therefore, shared code can be written once and built for the target environment. The trick is that each project manages its own references, resources, and code specific to the target software version. Check out my blog post on this amazing tool!
Linked Projects: In this case, 'SilverlightApplication1' is the source project where you create and maintain your code. Once a file or folder is created, the same is automatically created in the 'WpfApplication1' project!
BONUS!
These extensions are not free, but I cannot live without them!
-
VisualSVN
[link]
Source control is important for your projects, even if you are the only developer. It helps you keep track of your code changes and revert back or compare your history. VisualSVN is a Visual Studio plug-in that integrates Subversion and TortoiseSVN seamlessly with Visual Studio. VisualSVN virtually eliminates the management of your project source code files within Subversion. I have used AnkhSVN, but it just was not as pleasant and smooth as VisualSVN. VisualSVN is pennies compared to what it accomplishes.
-
Beyond Compare
[link]
Ok, this is not a Visual Studio add-on, but this helps you merge code together in a very pleasant way. I have used the merging feature that is built into Visual Studio and also used WinMerge. Let me tell you that Beyond Compare is just the best and worth every penny.
UPDATE!
I have joined the dark side of Visual Studio! Check out the theme below: