Print | Contents | Close |

New Features of the Visual Studio 2005 IDE

Learning objective

After completing this topic, you should be able to identify the components of various new feature areas of the Visual Studio 2005 integrated development environment (IDE).

1. Introduction to Visual Studio 2005

Visual Studio 2005 is the newest version of Visual Studio. It includes several new features and enhancements.

Previous versions of Visual Studio 2005 include

Visual Studio 97
Visual Studio 97 was first released by Microsoft in 1997. It used the same development platform for programming languages such as Visual Basic 5.0, Visual C++ 5.0, Visual J++ 1.1, Visual InterDev, and Visual FoxPro 5.0.

Visual Studio 97 was available in two editions – Professional and Enterprise.
Visual Studio 6.0
After Visual Studio 97, Microsoft released Visual Studio 6.0 in 1998. All the components in this new version were given a new 6.0 part number.

Although this version preserved the Visual Studio 97 environment, it also contained an additional environment. The Visual J++ 6.0 and Visual InterDev 6.0 components were separated from the Visual C++ environment.
Visual Studio .NET 2002
Visual Studio .NET was released in 2002 and was the first version to include the .NET Framework. In this version, support for the C# and Visual J# languages was introduced. Visual Basic also received an overhaul and was renamed Visual Basic .NET.

Visual Studio .NET enables you to create applications targeting Windows, the Web, and portable devices. These applications are compiled to a format called Common Intermediate Language (CIL) – a low-level human-readable programming language – rather than into standard machine language.
Visual Studio .NET 2003
Visual Studio .NET 2003 is a minor upgrade to Visual Studio .NET 2002, and includes .NET Framework version 1.1.

Visual Studio .NET 2003 provides built-in functionality that enables you to create code for mobile devices using ASP.NET or the .NET Compact Framework.

Question

When was the .NET Framework first included as part of Microsoft's Visual Studio?

Options:

  1. 1997
  2. 1998
  3. 2002
  4. 2003

Answer

The .NET Framework was first included as part of Microsoft's Visual Studio in 2002.

Option 1 is incorrect. Visual Studio 97 was Microsoft's initial release. It incorporated programming languages such as Visual Basic 5.0, Visual C++ 5.0, Visual J++ 1.1, Visual InterDev, and Visual FoxPro 5.0. It didn't, however, incorporate the .NET Framework.

Option 2 is incorrect. Microsoft released Visual Studio 6.0 in 1998. This version incorporated various programming languages with a 6.0 part number. It didn't incorporate the .NET Framework.

Option 3 is correct. In 2002, Microsoft released Visual Studio .NET, which incorporated the .NET Framework in its architecture. It also introduced support for C#.

Option 4 is incorrect. Visual Studio .NET 2003 included a minor upgrade to the .NET Framework, which was first incorporated in an earlier version of Visual Studio .NET.

Visual Studio 2005 includes an upgrade to the .NET Framework, named .NET Framework version 2.0.

New features and improvements in .NET Framework 2.0 include

Access Control List (ACL) support
The new .NET Framework 2.0 includes classes that you can use to create and modify ACLs. You use ACLs to grant or deny access to resources on a computer.
ADO.NET enhancements
The ADO.NET component in .NET Framework 2.0 has been improved and now supports asynchronous database operations, large value types, user-defined types, and XML data types.
ASP.NET enhancements
The ASP.NET component of .NET Framework 2.0 now provides new controls that make it easy to add commonly required functionality to web pages. It also enables you to

  • edit ASP.NET pages without having to write complex code
  • create consistent layouts for web pages
  • precompile web pages to produce executable code from source files


In .NET Framework 2.0, the code-behind model has been improved so that creating ASP.NET pages is now easier and more robust.
64-bit platform support
.NET Framework version 2.0 includes support for 64-bit applications – you can now use both managed and unmanaged code libraries on 64-bit platforms, which can utilize more memory resources than 32-bit platforms.
generics
.NET Framework 2.0 includes generics – predefined code templates that enable you to code more efficiently and to create strongly-typed data types. You access these in the System.Collection.Generic namespace.

2. The Visual Studio 2005 IDE

Visual Studio 2005 provides an integrated development environment (IDE). All the Visual Studio languages share this IDE.

You access the IDE from the Start menu.

When you start the Visual Studio 2005 IDE for the first time, you can choose which of several collections of default environment settings to apply, to customize its behavior and appearance.

The Start page in Visual Studio 2005 has been redesigned and is now a single page that contains the following sections:

Once you have opened a project in Visual Studio 2005, the Solution Explorer lists the following folders and files for the project:

My Project
Double-clicking the Reflection entry in the Solution Explorer gives you access to project settings. You can customize the settings, compile and debug programs, view references and resources, enable signing and security, and publish settings using this feature.
References
The References entry in the Solution Explorer enables you to add extra references – including .NET class libraries, .NET applications, and COM components – to a project.
bin
The bin directory contains the compiled – or binary – version of a project you build.
obj
The obj directory contains the first pass object files that Visual Studio 2005 uses to create the final, executable application file.
actual source files
Form1.cs and Program.cs are all examples of actual source files that you use in a project.

To access assembly information for a project, you right-click the project in the Solution Explorer and select Properties to open the project's Properties window.

In the Properties window, you then click the Assembly Information icon.

In the Assembly Information dialog box, you can modify the project's file properties, including its title, description, company name, product name, copyright details, and versioning numbers.

Whenever a new project is created, the Form Designer opens by default and displays the initial layout of a form. You can access the code for the form by selecting View - Code from the main menu.

In this example, the code window doesn't include any code for the form, because generated code in Visual Studio 2005 is located in the Form1.Designer.cs file. This is different from Visual Studio 2003, in which you would need a generated code section in a collapsed region of your file to display the form.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}

In Visual Studio 2005, you can hide specific code segments on the screen – a process called outlining. The code node is marked with a - (minus sign) icon, which you can click to hide a specific module.

Once the code for a method is hidden, a + (plus sign) icon displays next to the method. This is convenient if you are coding several methods and do not want to have to scroll through extraneous code.

Visual Studio 2005 also enables you to hide custom regions of code. You do this by using the #region directive at the top of the relevant part of the code, and the #endregion directive at the end of the relevant code. A + icon then displays next to the hidden code.

You can turn off the outlining feature by right-clicking in the code window and then selecting Outlining - Stop Outlining.

Alternatively, you can disable outlining from the main menu.

You select Edit - Outlining - Stop Outlining.

Alternatively, you press Alt+E, O, P.

The outlining lines are no longer visible in the code window.

The Error List window displays any errors, warnings, and messages created by Visual Studio 2005 when code is compiled and edited. This window enables you to identify and locate

You can double-click any listed error to view the file in which the problem occurs in the code.

Visual Studio supports shortcut keys for various commands. To access existing shortcuts or configure new ones, you first open the Options dialog box by selecting Tools - Options.

Note

Shortcuts for commands work best when virtual space is enabled. Virtual space refers to space beyond what you can see on screen. In Visual Studio, it enables you to continue typing code beyond the edge of the screen.

In the Options dialog box, you expand the Help node and select Keyboard in the tree pane. The settings pane then enables you to select a command to display its existing shortcut, or to configure new shortcuts for commands you use frequently.

The Task List in Visual Studio 2005 provides easy access to tasks and resources. You can customize the Task List by

setting it to display text
The text display feature ensures that multiple lines of text can be displayed in any row.
sorting columns
The column sorting feature adds sort triangles to column headers to show that the columns are sorted, and whether the sorting is in ascending or descending order.

The multiple-column sorting feature enables you to sort two or more columns at once. To do this, you press and hold the Shift key and click the second column header.
specifying which columns must display
The Show Columns command enables you to specify which columns must display on the context menu.
moving columns
The move columns feature enables you to drag and drop columns to move them into appropriate positions.
showing filenames only
Enabling the show files feature ensures that only filenames display.

You can drag a tool window to reposition it on the interface. When you do this, guide diamonds indicate the positions to which you can move the window. Each guide diamond includes four arrows, indicating positions above, below, and to either side of the diamond.

Once you drag a tool window to a new position in relation to a guide diamond, the area that the window will occupy once docked is highlighted.

When you drop the tool window onto the guide diamond, the window occupies the highlighted area.

You can access various resources in the developer community via the Community menu.

This menu enables you to post questions on the MSDN newsgroup, send product feedback to Microsoft, access useful web sites, and search online for components to use in your applications.

You can export the IDE settings to a file and use the file on another computer, or import a file containing IDE settings to your computer, using the Import and Export Settings Wizard. To launch this wizard, you select Tools - Import and Export Settings.

When the Import and Export Settings Wizard opens, you are given the option to export, import, or reconfigure the environment settings.

To import the settings, you select the Import selected environment settings radio button and then click Next.

On the Save Current Settings screen of the wizard, you can choose to save the current IDE settings. To do this, you specify the name of the file that contains the settings you want to import and the directory to which the file must be saved. The filename requires a .vssettings extension.

To accept the default settings and continue, you click Next.

On the Choose a Collection of Settings to Import screen, you can choose which collection of settings you want to import. You can select collections from the list of default settings or choose from your own personalized settings.

In this case, you want to save general development settings for the IDE.

You select General Development Settings and click Next.

On the Choose Settings to Import screen, you choose which settings to import from the category you selected.

To save all settings in the category, you ensure that All Settings is selected and then click Finish.

The wizard imports the settings you've chosen, and the Settings Import in Progress screen indicates the progress of the process.

When the process completes, the Import Complete screen confirms that your settings were successfully imported.

You then close the wizard by clicking the Close button.

Question

In which ways can you customize the IDE to meet your needs in Visual Studio 2005?

Options:

  1. Choose which IDE to install when you install Visual Studio 2005
  2. Export customized IDE settings
  3. Import customized IDE settings
  4. Reposition tool windows
  5. Specify which default environment settings the IDE must use when you first open it

Answer

You can customize the Visual Studio 2005 IDE on your computer by importing customized IDE settings, repositioning tool windows, and specifying which default environment settings the IDE must use when you first open it.

Option 1 is incorrect. Visual Studio 2005 provides a single IDE, which you use for all programming languages. You can, however, customize the IDE by configuring the default settings it must use.

Option 2 is incorrect. You can use the Import and Export Settings Wizard to export IDE environment settings you've saved in a file with a .vssettings extension. However, this enables another user to import and use the settings, rather than enabling you to alter your current IDE settings.

Option 3 is correct. Using the Import and Export Settings Wizard, you can choose to import custom IDE environment settings – saved in a file with a .vssettings extension – to a directory on your computer. You can then implement these settings as default settings for the IDE.

Option 4 is correct. Once you've opened the IDE, you can choose to reposition the tool windows it contains by dragging and dropping them into new positions. When you move a tool window in Visual Studio 2005, guide diamonds help you align it in a new position.

Option 5 is correct. When you first open the IDE, a dialog box lists different collections of default environment settings and enables you to choose which collection you want to implement, based on the type of project you need to design.

Question

Suppose you've just finished a C# project and you now want to reinstate the IDE settings you saved in a file named CurrentSettings-2006-08-21.vssettings. To do this, you've already launched the Import and Export Settings Wizard from the Tools menu, specified that you want to import settings, and identified the file and directory to which your current settings must be saved.

How do you restore all IDE settings from the required file?

Options:

  1. Select CurrentSettings-2006-08-21.vssettings, click Next, select General Settings, and click Finish
  2. Select CurrentSettings-2006-08-21.vssettings, click Next, accept the default selection of All Settings, and click Finish
  3. Click Browse, select CurrentSettings-2006-08-21.vssettings, click Next, click General Settings, and click Finish

Answer

To restore the IDE settings from the file, you select CurrentSettings-2006-08-21.vssettings, click Next, accept the default selection of All Settings, and click Finish.

Question

Match features of the Visual Studio 2005 IDE to examples of what you can use them to do.

Options:

  1. Access and configure project settings
  2. Configure keyboard shortcuts for commands
  3. Save your current IDE settings to a file before replacing the settings
  4. Search for code components online

Targets:

  1. Community menu
  2. Import and Export Settings Wizard
  3. Solution Explorer

Answer

The Community menu enables you to search for code components online, and the Import and Export Settings Wizard enables you to save your current IDE settings to a file before replacing the settings. The Solution Explorer enables you to access and configure project settings.

The My Project node in the Solution Explorer, which enables you to navigate project components and resources, provides easy access to project settings. Using these settings, you can, for example, compile and debug programs, view references and resources, enable signing and security, and publish settings.

You use Keyboard settings in the Options dialog box to check for existing keyboard shortcuts for commands, or to configure new shortcuts for commands you use frequently.

You can use the Import and Export Settings Wizard, which you launch via the Tools menu, to import or export a file in which you've saved customized IDE environment settings. Prior to importing settings, the wizard enables you to save your current IDE settings to a file so that you can recover them if necessary.

Options in the Community menu enable you to participate in an online community of developers. You can use the menu options, for example, to search for online components that other developers have created, post questions to the MSDN newsgroup and check their status, and send product feedback to Microsoft.

Summary

Visual Studio 2005 integrates .NET Framework version 2.0 in its architecture. .NET Framework 2.0 provides support for access control lists (ACLs) and 64-bit applications. It also includes ADO.NET and ASP.NET enhancements.

The Visual Studio 2005 integrated development environment (IDE) provides several new features that enhance and simplify application development. You can customize the IDE by choosing which collection of default environment settings it must use, and by importing custom IDE settings from a file.