DLL Hell and Version Policy
page 7 of 10
by Anuj Sahu
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 44366/ 131

Different level of version policy

There are three levels at which version policy can be applied in .NET: application-specific policy, publisher policy and machine-wide policy.

Application-specific Policy

Each application has an optional configuration file that can specify the application’s desire to bind to a different version of a dependent assembly. The name of the configuration file varies based on the application type. For executable files, the name of the configuration file is the name of the executable + a ".config" extension. For example, the configuration file for "app1.exe" would be "app1.exe.config." Configuration files for ASP.NET applications are always "web.config."

Example 5

An application APP1 was developed with .NET Framework 1.1 and now we want to direct the application to start with .NET Framework 2.0. This means then, a XML file with the following codes and name of that file must be app1.exe.config must be placed in the exact directory where app1.exe is present and now APP1 will be redirected to .Net 2.0 when the application starts.

Listing 3

       <supportedRuntime version="v2.0.50727"/>
       <supportedRuntime version="v1.1.4322"/>

Publisher Policy

While application-specific policy is set either by the application developer or administrator, publisher policy is set by the vendor of the shared assembly. We have already discussed this.

Machine-wide Policy

The final policy level is machine-wide policy (sometimes referred to as Administrator policy). Policy statements made in machine.config affect all applications running on the machine. Machine-wide policy is used by Administrators to force all applications on a given machine to use a particular version of an assembly.

View Entire Article

User Comments

Title: Chirag   
Name: Chirag
Date: 2007-02-19 6:47:21 AM
Really Nice article.

You can find another vay of assembly binding at,

Title: GOOD   
Date: 2007-01-07 8:48:54 AM
Title: Nice   
Name: Joydip
Date: 2007-01-05 4:56:14 AM

This is a nice article. The concepts are well explained. Good work. Keep it up. Please find my blog at:--



Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2023 ASPAlliance.com  |  Page Processed at 2023-09-28 4:36:04 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search