Visual Studio 2008 Options

Discover Hidden Tips and Tricks of Visual Studio 2008

Steve C Orr

October 30, 2009

10 Min Read
ITPro Today logo

Visual Studio 2008 is arguably the most advanced softwaredevelopment tool ever created. It has thousands of optional features that fewdevelopers have had the luxury of time to fully explore. Now, thanks to thisfeature summary of Visual Studio 2008 options, you needn t take the timenecessary to manually explore all those features. Read on to find out how toturbo-charge your development experience with these hidden gems.

 

Customize Your Development Environment

The Options dialog box of Visual Studio (shown in Figure1) can be invoked from the Tools dropdown menu. You can think of this dialogbox as a tabbed interface, with the tabs running vertically along the leftside. The initial tab that appears (General) allows developers to togglebetween a tabbed Single Document Interface (SDI) and a Multiple DocumentInterface (MDI) development environment. While the default Single DocumentInterface is generally considered to be the most modern approach, Visual Basic6 developers will find the Multiple Document Interface s floating code windowsto be more familiar (see Figure 2).


Figure 1: Visual Studio 2008 s Optionsdialog box.


Figure 2: Visual Basic 6 developerswill find the Multiple Document Interface option to be familiar.

The Recent files area also can be quite useful forcommanding Visual Studio to remember more recent projects and files than it normallywould. These recently used projects are listed on the Visual Studio Start Page,as well as the File dropdown menu.

The Fonts and Colors tab could easily keep a developerentertained for hours with the thousands of options it contains for dramaticallyaltering the visual appearance of virtually every aspect of Visual Studio (seeFigure 3). Every window and nearly every character can be independentlyadjusted. For example, in an HTML code window, you can independently configurebrackets, elements, attributes, comments, tag delimiters, and more. Individualwindows can be adjusted independently, as well; the immediate window, outputwindow, query editor, and command window are just a few of the more than twodozen windows that can be configured.


Figure 3: Stuck in a rut? Spice upyour development environment by tinkering with the fonts and colors of yourcode windows.

 

Help Options

Being well into the information age, it s no surprise thatVisual Studio provides an abundance of options for fine tuning our onlinequeries for programming help. Some developers may appreciate Visual Studio sability to leverage the always-up-to-date online MSDN Library for help, insteadof consuming potentially precious hard drive space with such voluminous texts. Onthe other hand, those lucky enough to have abundant disk space may prefer toleverage such a speedy data source instead of a potentially lagging (orsometimes non-existent) Internet connection.

In addition to the love/hate relationship we ve all hadwith MSDN s classic help system, more recent versions of Visual Studio allow avariety of top-notch .NET development Web sites to be simultaneously searched,as well. ASPAlliance.com, 4GuysFromRolla.com, and DotNetJunkies.com are just afew of the many Web sites listed in the default options shown in Figure 4. Unfortunately,there is currently no way to customize the list with new Web sites of your ownchoosing.


Figure 4: Ensure you always get helpwhen you need it by adjusting Visual Studio s help options.

 

Start Me Up

The Start tab also has some interesting options. Bydefault when Visual Studio is opened, its standard Start Page is displayed withnews links listed from an MSDN RSS feed. You can customize Visual Studio tolist an alternate RSS feed of your own choosing via the Start Page news channeltextbox shown in Figure 5. Alternatively, the standard start page can beskipped altogether to speed up Visual Studio s load time. To save yet anotherstep, Visual Studio can be configured to automatically open the last solutionwith which you were working, or to open the new/load project dialog box.


Figure 5: Optimize Visual Studioload times by adjusting its start-up options.

The Projects and Solutions tab is useful for configuringthe default paths for projects and templates. Another little known gem on thistab is the Save new projects when created checkbox (see Figure 6). By turningit off, you no longer need to pick a project filename and location wheninitially creating a project. This is highly useful for situations where you rejust tinkering with a throw-away project and you don t want to gum up your harddrive with code scraps. With this option turned off, Visual Studio will storeall the project s files in a temporary location unless, and until, you decideto explicitly save the project.


Figure 6: Adjust Visual Studio sdefault paths via the Projects and Solutions option tab.

 

Variable Type Inference

Visual Basic developers have a few default projectsettings all to themselves. Figure 7 shows these options, some of which arefamiliar to old-school Visual Basic developers. For example, Option Explicit isused to ensure variables are explicitly declared before they are used. Acompile error is thrown if undeclared variables are used when Option Explicitis set to True; otherwise, implicit type declarations are inferred. While typeinference had been shunned for a number of years, it has recently come backinto style, and is accepted even by C# programmers. Therefore, VB 2008introduced a new option: Option Infer. When Option Infer is set to its defaultvalue of True (and Option Explicit is also set to its default value of True),variables must be declared before they can be used but the variable type canbe automatically inferred.


Figure 7: Visual Basic developershave a few project default options all to themselves.

Option Strict helps minimize the chance of run-timeconversion errors by verifying valid variable conversions at compile time. OptionCompare is used to specify whether string comparisons should be case-sensitiveor not. Its default value of Binary specifies that string comparisons should becase-sensitive, while setting it to Text specifies case-insensitivity should beemployed.

 

Source Control

A variety of source control options are available to easeyour file management chores (see Figure 8). Visual Studio can be set toautomatically get all the latest files upon project load. Likewise, it also canbe set to automatically check in every file when a project is closed. Moreobscure options are available, as well, such as keeping files checked out whenchecking in changes, or allowing checked-in files to be edited.


Figure 8: Default source controloptions can be configured for Visual SourceSafe and Team Foundation Server.

 

Text Editor Options

Visual Studio s text editing features can be adjustedglobally or independently for each language and/or editor. For example, you canhave different editing options for Visual Basic, C#, HTML, XML, XAML, SQL, etc.Or, they can all be set globally and simultaneously from the Text Editor tabshown in Figure 9.


Figure 9: Line numbers and wordwrapping can be configured globally or for each individual editor.

Visual Studio s beloved statement completion options also canbe configured here. Line numbers can be turned on from this location also, asshown at the left side of Figure 10. Word wrapping also can be enabled so thatside-to-side scrolling in Visual Studio is never necessary. When word wrappingis enabled, an optional glyph (shown at the right side of Figure 10) can beenabled to visually indicate a wrapped line.


Figure 10: The line numbers on theleft and word wrapping glyph on the right can be enabled from the options shownin Figure 9.

Web developers will likely find the HTML-specific texteditor tab shown in Figure 11 to be of particular use. One of my personalfavorites is the Insert attribute value quotes when typing checkbox. Simplyby enabling this textbox (which is disabled by default), you can save tons oftime if you do a lot of manual HTML editing. After you type the equals sign foran HTML attribute, quotes will automatically be inserted in the correct placeso you can continue typing the attribute value smoothly, without having toworry about such annoying little details.


Figure 11: The HTML Format tab isespecially useful for Web developers.

The Tag Specific Options button opens an even moreimpressive dialog box (shown in Figure 12) that is useful for configuring thedefault display of many common HTML elements and ASP.NET Web controls. Coloring,indents, line breaks, and tag-specific options can all be configured here.


Figure 12: HTML elements and ASP.NETWeb controls can have their defaults set in the Tag Specific Options tab.

Web Developers should also find the HTML Designer tab tobe especially useful (see Figure 13). From here you can specify whether VisualStudio should initially open Web pages in HTML view, the designer view, orsplit pane view. HTML view typically opens the quickest, while design view andHTML view are arguably more user friendly.


Figure 13: Visual Studio s HTML Designerhas many options of particular interest to ASP.NET developers.

Figure 14 illustrates a handy feature of which fewdevelopers are aware. Split View (first introduced with Visual Studio 2008) canoptionally be split vertically instead of the horizontal default. This can bean efficient use of screen real-estate for those developers lucky enough tohave one of those increasingly popular wide-screen monitors.


Figure 14: Visual Studio 2008 s newsplit view can optionally be split vertically.

Those of you with Visual Studio Team System Test Editionwill have the Test Tools tab shown in Figure 15. From this tab you canconfigure a variety of unit testing capabilities, such as source code coloring.With this feature enabled, and after executing a set of tests, you can seespecifically which lines of code were executed because they ll be highlightedin a different color than the lines of code that were not exercised. This canbe a handy way to ensure critical code areas have been thoroughly tested undervarying circumstances.


Figure 15: Visual Studio Team SystemTest Edition provides a set of options that can help you thoroughly unit testyour code.

The checkbox shown at the bottom of Figure 15 can be auseful shortcut for quickly getting to the bottom of a failed unit test. Whenthis checkbox is checked, you can simply double-click on a failed test inVisual Studio 2008 to be taken directly to the line of code that caused thefailure.

 

Windows Forms Options

Developers still creating Windows forms applications willlikely find the Data UI Customization tab to be a time-saver when employingdata binding techniques (see Figure 16). This tab specifies what kinds ofcontrols should automatically be associated with particular kinds of data. Forexample, string variables are typically represented by Labels or TextBoxes forsingle values, or sometimes ListBoxes or ComboBoxes in cases where lists ofstrings are represented.


Figure 16: Data binding defaults canbe configured from this Data UI Customization dialog box.

Of course, this tab allows complete customization of suchdata binding options so you could instead represent strings with a RichTextBoxcontrol, for example. In case the default list of more than 50 controls isn tenough for your taste, the list can be customized with additional controls ofyour own choosing.

 

Conclusion

You may find a few more or less options in your VisualStudio installation than you ve seen here depending on which optionalcomponents you ve installed. For example, the various Visual Studio teameditions each add their own option sections, as does Visual Studio Tools forOffice.

As with most professions, it pays to be intimatelyfamiliar with the tools of your trade. Visual Studio is a highly powerfuldevelopment environment that gets even more powerful once you ve learned totame its many options. You should now have a more thorough understanding ofVisual Studio s capabilities so you can take your development experience to thenext level.

 

Steve C. Orr is anASPInsider, MCSD, Certified ScrumMaster, Microsoft MVP in ASP.NET, and authorof Beginning ASP.NET 2.0 AJAX by Wrox. He sbeen developing software solutions for leading companies in the Seattlearea for more than a decade. When he s not busy designing software systems orwriting about them, he can often be found loitering at local user groups andhabitually lurking in the ASP.NET newsgroup. Find out more about him at http://SteveOrr.net or e-mail him at mailto:[email protected].

Read more about:

Microsoft
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like