.NET Framework Version 1.1 - Side-By-Side Execution


Microsoft has announced the release of the new version of the .Net Framework 1.1. As with almost everything in life, the only constant is change.

Most companies have deployed applications supported on .Net Framework 1.0. The new version of .Net supports most of the features built using the original release version. The new version introduces new features and better support for existing functionality like support for IPv6 and improved support for developing mobile applications, among other improvements and additions.

The question is not only whether to upgrade to the new version or stay put with the existing version. Decisions need to be taken whether to convert all the existing applications to migrate completely to the new version.

.Net Framework 1.1 offers a third alternative - Side-By-Side Execution. This means enabling the existence of multiple versions of .Net Framework on the same machine at the same time and also multiple versions of applications that use a version of the .Net Framework. The managed application existing in this environment can select the version of the Framework that it will execute on. This can be optionally specified in the configuration files and the system follows some heuristics when the selection is not specified. The system defaults in the absence of the configuration options are as mentioned in the table below.

Default Version

Application Built with Version (.Net) System Installed Version (.Net) Version used by Application
1.0 1.1 1.1
1.0 Both 1.0 (unless configured otherwise)
1.1 1.0 Cannot run (unless configured otherwise)
1.1 1.1 1.1

Table : System defaults for the .Net Framework version that the Windows Application will try to run against.

Note that if .Net Framework v1.1 is installed, ASP.Net applications and Web services automatically run against version 1.1 , unless otherwise configured.

Configure Version for Windows Applications

To explicitly configure the version to be used by the application, you need to mention the version number in the configuration file. For windows applications, the version is specified in the section in the configuration file and the version number is specified with the element in the "version" attribute. The version number specified in this configuration tag should match the subdirectory in which the .Net Framework is installed.

Examples:

(1) Configuration to use version 1.1:

<configuration
>
...
<startup
>
<
supportedRuntime version="v1.1.4322"
/>
</
startup
>
...
</configuration
>

(2) Configuration to use version 1.0:

<configuration
>
...
<startup
>
<
supportedRuntime version="v1.0.3705"
/>
</
startup
>
...
</configuration
>

(3) Configuration to use version 1.1, if available, but support both the versions:

<configuration
>
...
<startup
>
<
supportedRuntime version="v1.1.4322"
/>
<
supportedRuntime version="v1.0.3705"
/>
</
startup
>
...
</configuration
>

Note that the preferred version should be mentioned first.

When no suitable version is available to execute an application, the CLR prompts the user to install one of the versions supported by the application.

Configure Version for ASP.Net Applications

ASP.Net applications can be configured to use a specific version of the .Net Framework by selecting the corresponding version of the ASP.Net ISAPI filter (aspnet_filter.dll) which can be set for an individual site or for the web server (by setting the ISAPI filter selection at the root web site).



Figure: Select the appropriate version of the aspnet_filter.dll file from the version subfolder within the <Windows>\Microsoft.Net\Framework folder in order to configure the version of .Net Framework to be used.

Visual Studio.Net

Visual Studio.Net targets the version of the .Net Framework that it was shipped with. Visual Studio .NET 2002 runs against version 1.0 and Visual Studio .NET 2003 runs against version 1.1. If you try to open a project created using version 1.0 in Visual Studio .NET 2003, the system will prompt for conversion to the new version. If the developer does not accept the conversion, the project cannot be opened.

Reference Links

NOTE: This article is purely for educational purpose. This article should not be construed as a best practices white paper. This article is entirely original, unless specified. Any resemblance to other material is an un-intentional coincidence and should not be misconstrued as malicious, slanderous, or any anything else here of.


Similar Articles