Greater Productivity with Visual Studio 2012

New features make it easier to work with large solutions

By Mark Cooper, Senior Systems Software Engineer

Synergy/DE 10.1 includes support for asynchronous loading and the Preview tab, which are two features that are new in Visual Studio 2012 and that are very handy when working with large enterprise solutions. Let’s say you have a solution with 15 or more projects and with dozens of source files. If you open the solution in Visual Studio 2010, you’ll be waiting awhile. Visual Studio 2010 won’t be responsive until every project is completely loaded. However, if you open the solution in Visual Studio 2012, which has asynchronous loading, most of the projects will be loaded in a background thread. This enables you to start using the editor and other Visual Studio features sooner. Files left open in an editing window when you last worked on the solution will need to be loaded before you can do anything, but once they are, you can edit them while Visual Studio loads the remaining projects. You won’t be able to access source code for unloaded projects, and you won’t be able to build the solution until every project is fully loaded. But you will be able to get started on loaded projects right away. Note that because Visual Studio 2012 won’t be responsive until projects for open code files are loaded, it’s a good idea when you close the solution to leave only code files you are currently working on open in the editor. And that leads us to the next feature, the file Preview tab.

The Preview tab allows you to view a source code file without actually opening the file for editing. To use this feature, click on a file in the Solution Explorer; you will see the contents of the file in the editing area, but the file’s tab (referred to as the Preview tab) will be gray and on the right-had side of the editing area, next to the Solution Explorer. Each file you click on in the Solution Explorer will replace the current file in the Preview tab. This enables you to look at files without cluttering up the editor with anything other than the files you’ve selected for editing. If you start editing a file in the Preview tab, the file will be moved into a standard editing window.

One of the best things about the Preview tab is that the Visual Studio 2012 debugger uses it to display code as it’s stepped into. This way, you can see what is going on in the code, but you don’t end up with all of the stepped-into source files inundating your working environment. For example, in Visual Studio 2010, if you start debugging with only two or three source code files open in the editor and then step into a dozen different source code files as you debug, all of these files will remain open in the editor when you’re finished debugging. It will be difficult to find the editor tabs for the files that are important to you, and they may no longer even be visible on the screen. And if you close the solution with all of these code files open in the editor, Visual Studio will take longer to load the solution the next time you open it. With Visual Studio 2012, however, only source files that were open before you started debugging will remain open when you’re finished. Note that not all files can be displayed in the Preview tab; you will not have access to files that use a designer. Designers take longer to load, so they are not available to Preview.

There are many new features and improvements to recommend Visual Studio 2012, but you’ll find that asynchronous project loading and the Preview tab are particularly helpful when working with large solutions.

See Synergy/DE 10.1 for more information.