Here we are again with a new Visual Studio. It’s hard to believe that 10 years have passed since Visual Studio .NET (codename Rainer) was released. Rainer represented a watershed moment for Windows developers as the promise of a unified language environment had finally been delivered.

For you history buffs, Microsoft’s unified language strategy dates back to at least October, 1993. At that time, during the Microsoft FoxPro DevCon in Orlando, Florida, Roger Heinen, then Senior Vice President in Microsoft’s Developer Division, talked about the future. In his keynote, Heinen had sketched a plan about the idea of having a common IDE were the developer could pick his language of choice, that perhaps regardless of language, code would be compiled to some common base. Candidly, this was nothing short heresy to the FoxPro crowd. And yet, the session was very well received. To this software developer, Heinen made a lasting impression on me. In a few short years, COM and interoperability were common place. In 2002, Microsoft released Visual Studio .NET and that common IDE thing Heinen talked about nearly 10 years earlier, was a reality. Another 10 years has gone by and we now have a new Visual Studio. While still true to .NET and the CLR, we have the new Windows Runtime (WinRT) at our disposal.

What makes the new Visual Studio such a dramatic upgrade is that it coincides with the new Windows 8. In this article, I’m going to briefly discuss some of the new features with the tooling in Visual Studio. As you will see, the folks at Microsoft have listened to the development community, making this the best Visual Studio to date. Between the new explorers, code editors, search and replace, quick launch and numerous other features, it will be immediately apparent that Visual Studio 2012 is at least as compelling an upgrade as Visual Studio 2010 was. This article is not meant to present an exhaustive and comprehensive list of new features. Rather, the features illustrated here are ones that I find to be of the most value. For comprehensive coverage on what’s new in Visual Studio 2012, I encourage you to visit http://www.microsoft.com/visualstudio/11/.

To aid your transition to Visual Studio 2012, you can freely open projects in either Visual Studio 2010 SP 1 or 2012. The one notable caveat to this rule is Windows 8 Modern Applications which are new to Visual Studio 2012 and can only be hosted on Windows 8.

Quick Launch

Every Visual Studio developer knows how difficult it is to navigate the Options dialog. There are literally hundreds of options in Visual Studio of which only a handful are accessed with regularity. The new Quick Launch feature, illustrated in Figure 1, addresses this need. If you are familiar with the new Windows 8 Search Charm, (Figure 2) that allows you to search for files, apps, etc., then you already know how the Quick Launch feature works.

Figure 1: You can access the Quick Launch feature in the upper right-hand section of the Visual Studio 2012 IDE.
Figure 2: Consolidated view of the Windows 8 Search Charm and result display.

Figure 3 illustrates the Visual Studio 2012 Quick Launch feature in action. As you can see, the search scope is comprehensive in that menu options as well as system options are displayed. Selecting the item in the results dialog will launch that option.

Figure 3: Quick Launch search results.

New Explorers: Solution, Test, Team and SQL

The explorers have received a major face lift. Many of the features developers have relied upon from third-party tools are now baked into the Visual Studio IDE. Figure 4 illustrates the new Solutions Explorer. Figure 5 illustrates the new search and filter feature. Optionally, the search can cover file contents and external items.

Figure 4: The new Solutions Explorer provides a new hierarchical view of classes and class members.
Figure 5: The new Solutions Explorer has a new search and filter feature.

Figure 6 shows the File Preview feature. If you elect to start editing the file, the tab then shifts to the left-hand portion of the editor as shown in Figure 7. This feature will help prevent the accumulation of unwanted tabs and as a result, will keep your work area less cluttered. There can only ever be one file in preview mode at a time.

Figure 6: When an unopened file is selected in the Solutions Explorer, the file appears in preview mode with its tab docked to the right-hand side of the editor.
Figure 7: Once you begin editing a file that is in preview mode, the tab then shifts to the left-hand portion of the editor.

The new Test Explorer (Figure 8), upon a successful build, will automatically detect tests in your solution. In addition to displaying the tests, the Test Explorer provides the ability to run your tests. Like the Solutions Explorer, the Test Explorer also has a search feature wherein you can filter the list with criteria such as a test name, test result, etc.

Figure 8: The new Test Explorer will automatically display tests in your solution.

Like the Solutions Explorer, selecting an item in the Test Explorer will open the file in preview mode. You can see this feature illustrated in Figure 9.

Figure 9: The Test Explorer, like the Solutions Explorer, upon item selection, will open that item in preview mode.

Later in this article I will demonstrate how to configure the new testing environment to run tests after each local build.

Team Explorer (Figure 10) has also undergone a complete overhaul. As with the other Explorers, full search and filter capabilities exist. The common theme amongst the explorers is to provide ease of navigation, search and “at a glance” efficiencies. These design concepts are also at the core of Windows 8.

Figure 10: The new Team Explorer in Visual Studio 2012.

The final explorer I want to discuss is the new SQL Server Object Explorer (Figure 11). In earlier versions of Visual Studio, when working with SQL Server, we had two interfaces to work with: the Server Explorer and the Schema View. Neither option worked all that well if you wanted to do something beyond looking at the basic structure of a table or the code in a stored procedure. The new SQL Server Object Explorer addresses those problems and finally, we have something akin to the Management Studio in Visual Studio! Whether you wish to create a new database, add a new constraint, index, stored procedure, view, etc., you no longer need to leave Visual Studio’s confines to get the job done in an efficient manner. Figure 12 illustrates an example of how to add a new table to a database.

Figure 11: The new SQL Server Object Explorer.
Figure 12: Visual Studio 2012 has better tooling for maintaining a SQL Server database.

New and Improved Editors

Going back to this article’s introduction where I waxed poetically about Roger Heinen’s unified language discussion from nearly 20 years ago, I want to direct your attention to the subject of JavaScript, CSS and HTML. Through time, it has become easier to deal with these items, which for all practical purposes, are software development languages in every sense that C#, VB, C++ etc., are. I say that in light of how much time is spent on JavaScript, CSS and HTML. And let’s face it; a code defect in these environments can be just as detrimental as one in the aforementioned .NET languages. With Visual Studio 2012, JavaScript, CSS and HTML are treated as first-class citizens and the development experience is, for the most part, not that different than the core .NET languages. I suggest that you watch the three videos on the ASP.Net site (see Table 1) that do a superb of explaining these new editor features:

Testing Improvements

Figure 13 illustrates an exciting new feature in Visual Studio 2012 that provides the option to run tests after each build. In earlier versions of Visual Studio, you would have to construct a custom post-build script or rely on the services of a build server. With Visual Studio 2012, this task has become much easier. To illustrate, Figure 14 shows the assertion for the About Controller’s Index Action has been changed and the Test Explorer shows a failing test.

Figure 13: In Visual Studio 2012 you can elect to have your tests run after each successful local build.
Figure 14: An example of a failed test notification after a successful build.

Automated test runs after a build is yet another improvement that makes it easier than ever to add unit testing to your software development practices. As for performance, the good news is that unit tests will run in the background - giving you the necessary feedback, as soon as possible, when a test is broken.

Don’t Like the ALL CAPS - There’s a Registry Hack for That!

Ever since the bits first dropped and folks saw the all upper case menus for the first time there has been an undercurrent of unrest. Much has been said on this topic and there is some good news - there’s a simple registry hack you can apply that will put the menu back to mixed case if that is your fancy! Here’s the hack:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\
General
"SuppressUppercaseConversion"=dword:00000001

This key does not exist by default so you will need to add it. As always, take care when tweaking the registry. Figure 15 illustrates the results of applying the hack.

Figure 15: Visual Studio 2012 main menu after the SuppressUppercaseConversion registry hack has been applied.

Conclusion

This article only scratches the surface of the new and useful features in Visual Studio 2012. My goal here was to present those features that you will find of most use. With any new development environment, the real fun comes through your own exploration. As you will quickly find, there are many online resources out there that will help complete the picture for you. When I started this article, I began with an anecdote that is nearly 20 years old. One thing I’ve learned in my time in this business is that what is “new” is often just a twist on something that came before. Visual Studio 2012 represents the continuation of a strategy that was first articulated to this author nearly 20 years ago. If that’s not old enough for you and you want more history, then may I suggest you watch Doug Englebart’s Mother of All Demos from 1968: http://sloan.stanford.edu/mousesite/1968Demo.html.