Product Reviews

Two Productivity Tools for Visual Studio 2010

The latest versions of CodeRush and ReSharper take advantage of the new features in Visual Studio 2010. Both tools continue to provide valuable -- even essential -- support for developers at a very reasonable price.

Both Developer Express CodeRush and JetBrains ReSharper are add-ins that extend Visual Studio by providing a plethora of tools that allow developers to create better code faster. I reviewed the Visual Studio 2008 versions of both products in the September 2009 ("Write Better Code, Faster, with ReSharper 4.5") and October 2009 ("Turbo Charge Visual Studio with DevExpress CodeRush") issues. While CodeRush is intended to support both C# and Visual Basic even-handedly, ReSharper targets the C# developer, though it also provides extensive support if you're programming in Visual Basic. Perversely, for someone who still considers himself a Visual Basic programmer -- though my client base is split 50/50 between C# and Visual Basic -- I preferred ReSharper in those reviews because it didn't require me to memorize as many keystroke combinations as CodeRush to access its functionality.

With the release of Visual Studio 2010, both Developer Express and JetBrains have released new versions of their products. (You can read interviews with JetBrains developers and DevExpress developers on the complexities of developing for Visual Studio.)

Capitalize on CodeRush
The most obvious change in CodeRush is its use of Windows Presentation Foundation (WPF), or "WPF-ization." The product's developers have made a big effort to take advantage of the new Visual Studio screen display. One example: At the end of each method or property name, a small number appears that represents some measure of the method -- you can choose between complexity and maintainability measures. If you haven't upgraded to Visual Studio 2010, you can still access most of the new features of CodeRush: DevExpress developed an abstraction of the presentation layer for CodeRush that has both a Graphics Device Interface (GDI) and a WPF driver.

[Click on image for larger view.]
Figure 1. CodeRush enriches the display in the editor window with icons flagging the type of each method, feedback on a method's maintainability indexes and information about the flow of control.

While the code generation and refactoring often get the most attention, I think it's the interactive code analysis that's most useful. Here again, the CodeRush exploitation of the Visual Studio WPF interface shines. For instance, the latest version of CodeRush marks every flow break (such as exit, return and end statements) with a small arrow. Hovering your mouse over the arrow flashes the line where control will be transferred to when the statement executes. If control transfers out of the method, a small animation flies to the method's end. These kinds of tools help the developer understand what the code will actually do without having to step through it.

When making changes to code, you need to find where the code is called from. New navigation features in CodeRush enable you to skip through your code to all the calls to any method just by selecting an option from a context menu. Tab and Shift-Tab allow you to work through all the overloads for a method. When you invoke any of these navigation options, CodeRush pops up a tab showing all of the navigation options available to you, reducing the need to remember keystrokes.

Reach Higher with ReSharper
If CodeRush is expanding its feature set within its existing support, ReSharper is expanding its range. As an ASP.NET developer, I especially like the new ReSharper File Structure window, which goes beyond the Visual Studio Document outline to support navigating through pages of complex HTML. The "Navigate to related files" menu choice lets me get to all the files related to a Web page (graphics, stylesheets, user controls, JavaScript files and so on) without scrolling up and down through the Solution Explorer window. ReSharper has also added support specifically for ASP.NET Model-View-Controller (MVC) developers.

[Click on image for larger view.]
Figure 2. Turning on the "Track caret in editor" option in ReSharper causes the File Structure window to highlight the part of the Web page in which you're currently working.

That's not to diminish the code generation and refactoring abilities that come with ReSharper. If you've been putting off becoming an expert in LINQ, for instance, the ReSharper capacity to automatically refactor C# foreach loops into LINQ queries is a good way to get started.

ReSharper, like CodeRush, has always offered a wealth of recommendations about ways you can improve your code. The latest version lets you define your own rules to recognize -- and even implement -- project-specific best practices. In addition to getting this advice as you type, you can also run inspections of whole projects.

Get Better Code
Both packages offer separate Options dialogs to allow you to enable, disable and customize features. When you install CodeRush, you get an option to work in a "newbie" mode, which provides more prompting, or in an "expert" mode. ReSharper offers, on installation, three options for your keyboard: one for experienced Visual Studio developers, one for Java developers and one that does no mapping to your keyboard.

Both DevExpress and JetBrains have tuned their add-ins to reduce the demands on your computer, but all of this additional functionality comes at a price: You may find yourself having to turn off features that you don't need to improve responsiveness.

CodeRush for Visual Studio 2010 10.1 and Refactor! Pro for Visual Studio 2010 10.1

Developer Express Inc.
Phone: 818-844-3383
Price: $249.99
Quick Facts: Productivity feature add-ins for Visual Studio with extensive refactoring support
Pros: Extends powerful refactoring tools with additional support for developers working with complex applications and on-the-fly code analysis
Cons: Taking advantage of all the features requires a powerful CPU; many developers will need to pick the options they want and turn off others

ReSharper 5.0

Phone: 888-672-1076
Price: $199 Personal license for Full Edition; Organization and academic licenses available
Quick Facts: A productivity feature add-in for Visual Studio targeted at C# developers
Pros: Extends the power of the original tool into new environments (especially ASP.NET) and up the value chain into project maintenance
Cons: Taking advantage of all the features requires a powerful CPU; many developers will need to pick the options they want and turn off others

About the Author

Peter Vogel is a system architect and principal in PH&V Information Services. PH&V provides full-stack consulting from UX design through object modeling to database design. Peter tweets about his VSM columns with the hashtag #vogelarticles. His blog posts on user experience design can be found at

comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.