Return to DNJ Online home page

 

The .NET Platform
Development Tools
COM & COM+
Data Access
Web Development
XML Technologies
Windows Servers
Wireless & Mobile
Security issues
Design & Process
Career Development
Analysis & Comment
Disposable Objects

Subscribe to our RSS feed to receive notification of new articles as they are published.

Events Diary
Software Update

About Us
Advertisers

 

You are not logged in: login here to access all areas.


What's new in Visual Studio 2005

Visual Studio 2005 promises new and enhanced features for almost every aspect of Windows and Web-based software development. Alex Homer introduces an extensive series of articles that examine exactly what is on offer.

Author: Alex Homer

Last updated: May 2005

Accompanying the forthcoming release of .NET Framework 2.0 is a new set of development tools in the form of Visual Studio 2005. This is available in a number of permuations, ranging from the cut-down Express versions up to the new Visual Studio 2005 Team System.
      There are five Express versions of Visual Studio 2005. These are low-cost language or technology-specific tools and include Visual Basic 2005 Express, Visual C# 2005 Express, Visual C++ 2005 Express, Visual J# 2005 Express and Visual Web Developer 2005 Express. This latter supports all three languages, but does not support Windows Forms development There is also SQL Server 2005 Express, a cut-down version of SQL Server 2005 that effectively replaces MSDE, and is available as a free download. You can see the Express range of tools and download the beta versions at http://lab.msdn.microsoft.com/express/.
      Then there are the Visual Studio 2005 Standard and Professional Editions. These include all the Microsoft .NET languages, namely Visual Basic, C# and J#. They also add more features, such as mobile device development, the database design tools, the Class Designer, and XSLT support. The Professional Edition comes with Crystal Reports as well as the SQL Server Reporting Services, and adds support for high-end features such as remote debugging, SQL Server 2005 integration and 64-bit compilation. It also includes SQL Server 2005 Developer Edition.
      Finally there is the Visual Studio Team System (VSTS) suite, which is aimed at supporting the whole of the development lifecycle. For further information see Ian Murphy’s review of Visual Studio Team System.
      In this set of articles we look at the new features in Visual Studio 2005 Professional. The Standard Edition and the Express versions implement many of these features within the standard IDE, but do not provide all the associated tools and resources.

An overview of Visual Web Developer 2005 Express is at http://msdn2.microsoft.com/library/4t011t6f.aspx. There is also a site devoted to the tool at http://lab.msdn.microsoft.com/express/vwd/ and check out the guided tour at http://beta.asp.net/GuidedTour/

There are too many new features in Visual Studio 2005 to cover them all in detail, and some are not of importance to developers as they just make features of Visual Studio work more smoothly or improve the general interface and performance of the tool. However, the more important changes in Visual Studio 2005 are described below, and in the following four articles:

We start by looking at some of the vast number of improvements that have been made to the code editor and IDE for general programming tasks. These include:

Refactoring
Refactoring is really just a fancy term that is used to encompass the many ways that you can change the structure and content of your code. This is the Refactor menu is Visual Studio 2005, where you have a range of options for renaming, extracting, encapsulating and restructuring parts of your application's code:

The options on the Refactor menu are:

Refactoring, using the options described here, can save you a great deal of time and reduce errors as you edit and change your code. The results are not always perfect, but there are warnings displayed when the result will leave your code in an inconsistent state, or when the refactoring operation is not possible.

Surround With and Outlining
Refactoring is one of the actions that can be accomplished by right-clicking on the editing surface. Several other useful new features are accessible in the Visual Studio 2005 editor through the right-click pop-up context menu:

As well as the Refactor submenu, there are options to:

Code snippets and editing markers
The right-click context menu shown above allows you to insert a code snippet into your code in the editor window. Selecting this option opens a list of the available snippets, which includes (depending on the current language and context) things like a compiler #if block, a collapsible #region block, a namespace, interface or class declaration; a constructor or Main routine; or any one of many different code constructs.
    In C#, these constructs include different kinds of loops, a switch statement, try, catch and finally blocks, a MessageBox.Show() statement, and so forth. Shown below is what happens when you select a relatively simple code snippet from the list - in this case a foreach construct. Notice how it includes placeholders for the variables and types that you must enter (shaded green in the screenshot). As you press the Tab key, the input cursor moves through these placeholders, and the IntelliSense feature makes it easy to enter the required types and variable names as you go.

VB.NET 2.0 gives you an even more comprehensive set of code snippets. Shown below is the list that opens when you select the ‘Insert Snippet’ item on the right-click context menu. You can see that there are groups of features and actions, depending on the task you want to carry out. You can manage the lists for yourself, importing new snippets and removing snippets you don't want using the Code Snippets Manager dialog available from the ‘Tools’ menu.

Each option opens another list of more specific items, until you finally get to the list of available actions For example, we selected ‘Windows Forms Applications’ in the dialog above, followed by ‘Controls and Components’ and then ‘ListBox’ to get to the list of tasks shown below. However, the blue ‘Insert Snippet’ line shown above does display a ‘bread-crumb trail’ list of the options you select, so you can see where you are in the hierarchy of lists and navigate back through them if you get lost.

One other point to note from these screenshots is how the editor now tracks which lines in the code have been edited. Changes that have been saved during the current session are indicated by a green bar in the left-hand side of the editor window, and lines that contain unsaved changes are marked with a yellow bar.

Enhanced IntelliSense and Auto-Correct
These screenshots also demonstrate one of the ways in which the IntelliSense feature in Visual Studio has been improved. Syntax tips, lists of methods, variables, classes and so on pop up continually as you enter code, making the process even more efficient than in previous versions. There are also other types of pop-up help features, including the small red bar that appears under your code when you edit a variable name, allowing you to refactor the code by changing all instances of that name.
     For example, if an error is detected in your Visual Basic .NET code as you edit, you get a pop-up warning that describes the error and suggests how to fix it (a feature not implemented in C# at the moment). If you agree with the solution, you just click the link in the dialog and your code is updated:

There are many other features in the auto-correct system as well, including prompting for missing namespace declarations and solving the more obvious syntax or semantic errors, such as the use of incompatible keyword combinations.
     The editor in Visual Studio 2005 also contains many more subtle improvements, some of which are based on user feedback from previous versions. These include:

For a general introduction to Visual Studio 2005, with links to the various product enhancements and more detail of each of the new features, go to http://msdn2.microsoft.com/library/fx6bk1f4.aspx. To learn more about the features for Web developers and ASP.NET, try http://msdn2.microsoft.com/library/s57a598e.aspx.
     For more details of the way that the new IDE supports new and existing features of the most popular programming language, try the following links. For VB.NET developers, go to http://msdn2.microsoft.com/library/y17w47af.aspx. To learn more about the features aimed at C# developers, go to http://msdn2.microsoft.com/library/9bt0w6h6.aspx.

Send to a friend

Top of page

Click here for our Privacy Statement. Copyright © Matt Publishing. All rights reserved. No part of this site may be reproduced without the prior consent of the copyright holder.

Send to a friend

Introduction to .NET Framework 2.0

Migrating to Visual Studio 2005

Visual Studio Team System reviewed

Interview with Craig Murphy, General Manager of the Visual Studio product team