Integrated Development Environment

Integrated Development Environment

Visual Studio 2005 is an integrated development environment (IDE) for developing and maintaining managed, native, and mixed-mode applications. A variety of project templates are available to create a diverse assortment of applications. There are templates for Microsoft Windows Forms, Console, ASP.NET Web Site, ASP.NET Web Service, SmartPhone2003, Windows CE 5.0, and other types of applications. There are templates that target specific devices, including mobile devices. In addition, developers can choose the language of their choice, including C#, Microsoft Visual Basic .NET, and Managed C++.

The Visual Studio 2005 IDE has many rapid application development (RAD) tools. The Visual Studio Code Editor, Microsoft IntelliSense, Solution Explorer, Class View, Object Browser, and the class diagram are essential components of the user interface and contribute to improved developer productivity, accuracy, and efficiency. Many of the tools have been updated, such as IntelliSense and the Object Browser. Other tools, including the class diagram, are new.

Start Page

Start Page is the gateway screen into Visual Studio. For many developers, the Start Page is the first window presented in Visual Studio. The Start Page, shown in Figure 4-1, is completely redesigned in Visual Studio 2005. Visual Studio normally starts with the Start Page. If the page is not visible, open the Start Page from the View Menu. Select the Other Windows submenu and then the Start Page menu command.

Image from book
Figure 4-1: Visual Studio 2005 Start Page

The redesigned Start Page has four panes:

  • Recent Projects This pane lists the recently opened projects. Select an item in the project list to open that project. The Open and Create buttons at the bottom of this pane open or create a new project.

  • MSDN: Visual C# This pane contains links to recent news on Visual Studio and C#. Each topic is previewed. Click the related link to view the complete article.

  • Getting Started This pane contains helpful links for new Visual Studio developers.

  • Visual Studio Headlines This pane allows developers to submit feedback directly to Microsoft.

Community Integration

The Visual Studio community is an important resource for both novice and experienced developers of managed and unmanaged code. The availability of the aggregate knowledge of developers is of great benefit to everyone. Visual Studio 2005 has a menu dedicated to the developer community. The Community menu provides convenient access to the developer community, which makes participation easier. The Community menu offers the following command choices:

  • Ask a Question This command redirects developers to the Microsoft Community Forum, where questions are posted to Microsoft. You can also view previous posts and responses.

  • Check Question Status This command redirects developers to the Microsoft Community Forum, where the status of previous posts can be checked.

  • Send Feedback This command redirects developers to the MSDN Product Feedback Center.

  • Developer Center This command redirects developers to the Microsoft Visual C# Development Center, where C#-related topics are discussed.

  • Codezone Community This command redirects users to the Microsoft Codezone page, which features a Web site each month that makes substantial technological contributions to the developer community. It also lists number of online communities.

  • Partner Products Catalog This command redirects users to the Microsoft Visual Studio Industry Partner program. You can search for a particular Microsoft partner, product, or solution from this page.

  • Community Search This command searches online for downloadable project templates, code snippets, macros, and other helpful resources.

Creating Projects

Developing an application in Visual Studio typically starts with the creation of a project. Projects are the basic organization component of Visual Studio, in which files, resources, reference, and other constituents of an application are grouped. Related projects are sometimes grouped into solutions, which can contain projects of different types and languages. For example, during the development cycle, it is common to group applications and related libraries in the same solution. The option to add a new project to an open solution or creating the project in a new solution has changed. Figure 4-2 shows the New Project dialog box. Toward the bottom of the dialog box is a drop-down list box containing the choices Create New Solution and Add To Solution. This option is not available unless a solution is already open. If desired, select the Create Directory For Solution option box to create a separate directory for the solution.

Image from book
Figure 4-2: New Project dialog box

Solution Explorer

You can configure both solutions and projects from the Solution Explorer window. If not visible, display the Solution Explorer window from the View menu. Solution Explorer is shown in Figure 4-3. In this example, the solution is Airline Seats, which has two projects: Airline Seats and Person. Developers can change the properties of a solution or any project. From Solution Explorer, open the shortcut menu on the solution or project icon and then select the Properties menu item. In the Project properties, configure the application settings, configure the build environment, configure debug settings, resources, define default application settings, view or add references to the project, publish the ClickOnce manifests, or sign assemblies. The user interface of Project properties has changed and been renamed as the Project Designer window, shown in Figure 4-4.

Image from book
Figure 4-3: Solution Explorer window
Image from book
Figure 4-4: Project Designer window

In the Solution Explorer window, the AssemblyInfo.cs file has been moved to the Properties folder. The AssemblyInfo.cs file contains assembly attributes that define assembly level metadata, such as the version number and culture.

The location of Solution Explorer and some other Visual Studio windows default to a docking window. In Visual Studio 2005, these windows can be tabbed or set to auto hide, which is an improvement. Figure 4-5 shows Solution Explorer in a tabbed window. Display the shortcut menu on the window header to change the alignment to Tabbed Document.

Image from book
Figure 4-5: Solution Explorer as a tabbed window

Project Types

In Visual Studio 2005, a wide assortment of projects are available. Common projects, such as a Windows Application and Class Library, are still available. However, new project types have also been introduced. Table 4-1 lists the standard project types available.

Table 4-1: Project Types

Template Name


Windows Application

Create a Windows Forms desktop application using this template.

Class Library

Create a managed dynamic-link library (DLL) using this template.

Windows Control Library

Create custom controls for Windows Forms applications using this template.

Web Control Library

Create custom Web server controls for ASP.NET applications using this template.

Console Application

Create a console application using this template.

Windows Service

Create a Windows Service application, which is a daemon process that can run across logon sessions, using this template.

Empty Project

Create a custom project, which is devoid of the normal files, with this template. The developer is responsible for building the project from essentially nothing.

Crystal Reports Application

Create a Windows Forms application that contains a Crystal Report using this template.

Web applications are no longer included with the standard templates detailed in Table 4-1. Web applications are created from the File menu. Select the New submenu and the Web Site menu command. The New Web Site dialog box appears, displaying Web application templates. Table 4-2 lists the available Web templates.

Table 4-2: Web Project Types
Open table as spreadsheet



ASP.NET Web Site

Create an ASP.NET Web application using this template.

ASP.NET Web Service

Create an ASP.NET Web Service using this template.

Personal Web Site Starter Kit

Create an ASP.NET 2.0 starter Web site, including an initial home page, using this template.

Empty Web Site

Create a custom Web project, which is devoid of the normal files, using this template. The developer is responsible for building the Web site from essentially nothing.

ASP.NET Crystal Reports Web Site

Create a new Web site that includes a sample Crystal Report using this template.

Visual Studio 2005 also includes a variety of special-purpose project templates. Some of these templates are detailed in Table 4-3.

Table 4-3: Special-Purpose Project Templates



Smart Device Project Type

This project type includes the Pocket PC 2003, Smartphone 2003, and Windows CE 5.0 category of templates, which target mobile and embedded devices.

SQL Server Project

Create a database project targeting a Microsoft SQL Server 2005 database using this template. In this project, developers can create a variety of classes for database constructs, such as stored procedures.

Starter Kit Project Types

This project type includes the Screen Saver Starter Kit and Movie Collection Starter Kit templates. The Screen Saver Starter Kit is a sample screen saver that displays new articles from Really Simple Syndication (RSS) feeds. The Movie Collection Starter Kit is a sample application that demonstrates various programming techniques, including SQL programming.

Setup And Development Project Type

This type includes the Setup, Web Setup, Merge Module, Setup Wizard, CAB, and Smart Device CAB project templates. These are templates for creating setup and deployment applications and files.


Extensibility templates include the Visual Studio Add-In and Shared Add-In templates. These are templates for creating add-ins, which are managed DLLs that run within the context of Visual Studio.

Adding References

Developers add application references to projects to access foreign types contained in those applications. The Add Reference dialog box in Visual Studio 2005 has some new windows. To add a reference from the Project menu, choose the Add Reference menu command. Add Web Reference adds a reference to a Web service application. References can also be added from Solution Explorer. Open a shortcut menu on the Reference folder. From the menu, choose the Add Reference or Add Web Reference menu command. The Add Reference command now has five windows. References can be added from any of the windows.

  • The .NET window lists system libraries of the Common Language Runtime (CLR) and .NET Framework Class Library.

  • The COM window lists registered COM servers, which contain unmanaged code.

  • The Projects window lists references to other projects in the current solution.

  • The Browse Window allows developers to browse for references.

  • The Recent window lists recent references that have been added to this solution.

Data Menu

In Visual Studio 2005, the Data menu has been added to the menu system. From this menu, developers can add a new data source to the project or show available data sources. When adding new data sources, you are presented with the Data Source Configuration Wizard, shown in Figure 4-6.

Image from book
Figure 4-6: Data Source Configuration Wizard

The Data Source Configuration Wizard works with three types of data sources:

  • A Database data source is a connection to a database, which returns a dataset to the application. A dataset is a disconnected client-side representation of data at the data source.

  • A Web Service data source retrieves data from a Web service. This option adds a Web reference to the specified Web service application.

  • An Object data source retrieves data from a managed object.

Managing Windows in Visual Studio

Visual Studio offers an array of windows for a variety of purposes. The potential windows include Code Editor windows, a variety of toolboxes, Server Explorer, Solution Explorer, Property windows, and much more. Most of these windows are movable, but can also be docked. In Visual Studio, it has been easy to misplace windows or muddle the interface while attempting to dock a window. Visual Studio 2005 provides visual clues to aid in moving and docking windows, including a guide diamond with docking arrows to help dock windows correctly.

Switching between project files and windows is also improved. Visual Studio 2005 has the IDE Navigator to help toggle between open files and windows. Pressing Ctrl+Tab opens the IDE Navigator. Once there, you can navigate between open files and windows. This IDE Navigator dialog box is shown in Figure 4-7. When the window is open, use Ctrl+arrow keys or Ctrl+Tab to navigate the items in the window.

Image from book
Figure 4-7: IDE Navigator


AutoRecover is another feature that is added to Visual Studio 2005. This option periodically saves a project and prevents the loss of data when Visual Studio is exited abnormally. Figure 4-8 shows the AutoRecover window of the Options dialog box. Open this window from the Tools menu and Options menu command. AutoRecover is found in the Environment settings. In the AutoRecover window, set the frequency of auto saves and the length of time backups are retained.

Image from book
Figure 4-8: AutoRecover window

When re-entering Visual Studio after an abnormal termination, the Microsoft Visual Studio Recovered Files dialog box automatically displays. (See Figure 4-9.) In the dialog box, confirm the files to recover.

Image from book
Figure 4-9: Microsoft Visual Studio Recovered Files dialog box