What’s New in Visual Studio .NET 1.1?

What’s New in Visual Studio .NET 1.1?

his article assumes you are familiar with Visual Studio .NET 1.0 and it presents only the new features of the IDE (Integrated Development Environment) of Visual Studio .NET 1.1, for both C# and Visual Basic .NET. J# is not discussed because it was not part of Visual Studio .NET 1.0. In the interest of space, some minor cosmetic changes (such as reorganization of the Start page) are not listed.

The changes and innovations from Visual Studio .NET 1.0 to Visual Studio .NET 1.1 are mostly improvement to the overall development experience and automating routine activities such as implementing an interface or events. Visual Studio .NET 1.1 also introduces new capabilities such as build events and specifying supported runtime versions.

IntelliSense Enhancements
IntelliSense gets a boost with Visual Studio .NET 1.1, with many new features and capabilities. These features are clearly aimed at automating mundane programming tasks and have nothing to do with the new .NET 1.1 runtime.

IntelliSense History. Visual Studio .NET 1.1 keeps track of the most frequently used methods or properties of any type you interact with during code writing. When you type the dot (“.”) character to de-reference a type member, IntelliSense will suggest the member you are most likely to choose based on your history of using this type. If you start typing the member prefix, IntelliSense will refine its suggestion but still base it on history. For example, consider the Trace class, defined in the System.Diagnostics namespace. The Trace class is used to trace some information using the WriteLine() static method:

   Trace.WriteLine("I am here");

WriteLine() writes the content of the trace message to the Output window and appends a new line feed. The Trace class has a method called Write() that does not append the line feed, so you are far less likely to use it. In Visual Studio .NET 1.0, if you were to type “Trace.w” then IntelliSense would suggest Write() instead of WriteLine(), because it is first alphabetically. In Visual Studio .NET 1.1, if you use WriteLine() more frequently that you use Write(), then IntelliSense will suggest WriteLine() instead (see Figure 1).

See also  Comparing different methods of testing your Infrastructure-as-Code
C# Automatic Event Hookup and Handler Generation
.NET delegate-based events are a type safe way to connect an event publisher to an event subscriber. Because the exact signature of the event handling method is known, IntelliSense can generate the code creating a new delegate object targeting the event handling method, and even the event handling method itself.

For example, consider the MyPublisher class, which is used to publish events to interested subscribers about changes to the value of some number:

   public delegate void NumberChanged(int num);   public class MyPublisher   {      public event NumberChanged NumberChanged;      /* Other methods and members  */    } 

Suppose the class MySubscriber wants to subscribe to the event in the class constructor. When you type the += operator to assign into a delegate, IntelliSense will preset a ToolTip offering to add a new delegate of a matching type by pressing the Tab key. If you do not like the default target method name you can simply type a different method name in its place. If the target method does not exist, IntelliSense will offer to generate a handling method by that name by pressing the Tab key once more. This sequence is presented in Figure 3. This IntelliSense support only works with delegates defined as events (not mere delegates). Also worth mentioning is that there is no IntelliSense support for removing a subscription:

   public void UnSubscribe()   {      //This has no IntelliSense support:       publisher.NumberChanged -= new      NumberChanged(OnNumberChnaged);   } 
Project Settings
The most important change to the project settings options is support for different CLR versions (both for C# and Visual Basic .NET). For C# projects there are also build events and new compiler instructions. These compiler settings provide better affinity to the actual compiler switches available when using the compiler directly via the command line. Following is a rundown of the new features in the same order that they appear in the Project Properties Pages.

The .NET Framework Version dialog lets you select the CLR versions you wish to support. The available options are version 1.1 (the default) only, version 1.0 only, or both 1.0 and 1.1.

Specifying Supported Runtime Version. At present, Visual Studio .NET can only build applications targeting the highest CLR version installed on the machine (this may change in the future). Developers can indicate in the application configuration file which version or versions of the CLR (such as 1.0 or 1.1) the application supports. You can use Visual Studio .NET 1.1 to edit the application configuration file for supported CLR versions.

Build Events
Visual Studio .NET 1.1 introduces an old-time favorite and useful feature: build events. Build events let you specify command line instructions to execute in conjunction with the build process. In the Common Properties, there is a new item called Build Events (see Figure 7). The pre-build command line executes every time before the build starts. The post-build event is the more useful event. You may choose to provide command line instructions that automate parts or all of the deployment of the project’s output. You can have Visual Studio .NET 1.1 fire the post-build event always, on successful builds only (the default), or when the build process updates the project’s output. For example, if you develop a shared class library, your post build event can install the library in the GAC. To do so, you need to invoke the gacutil command line utility with the -i switch. Click the to bring up the Post-build Event Command line editor.

Tools Options
The Options under the Tools menu contain many new features and changes. Here is a list of the most important of these changes.

Build events let you specify command lines instructions to execute in conjunction with the build process.

Projects and Solutions Environment. The new checkbox, “Track Active Items in Solution Explorer” enables the Server Explorer to automatically track the item you are working with (see Figure 11). The Build and Run Options control what happens when you build and run your projects. The old option of saving all documents when a new build is launched is now split into two options: You can choose to save all changes to all documents and solution files (the default), or choose to save changes to open documents only. In addition, you can explicitly instruct Visual Studio .NET 1.1 to build only the active project or all projects whenever you build or start (by pressing F5) your project.

See also  Comparing different methods of testing your Infrastructure-as-Code

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist

©2024 Copyright DevX - All Rights Reserved. Registration or use of this site constitutes acceptance of our Terms of Service and Privacy Policy.