How Do I...Use Assembly Version Policy?
A primary goal of the deployment system in the .NET Framework is to eliminate conflicts between applications caused by
shared components and shared states (or DLL conflicts). A key solution to this problem is a robust
versioning system. The .NET Framework records information about an application's dependencies
in the assembly manifest. This dependency information includes a version number that is used at runtime to load the proper
version of a dependency.
By default, the common language runtime will load the version of a dependency that is specified in the manifest. This is
preferred in the majority of scenarios. However, there are cases where running an application with
a different version of a dependency can be useful. In order to accomplish this, version policies can be included
in an application's configuration file. For example, the following XML code fragment redirects references to version 184.108.40.206 of a shared
assembly called "CalcR" up to version 220.127.116.11 of that assembly:
In addition to policies specified at the application level, the .NET Framework also provides two other policy levels: publisher and administrator.
A Publisher policy statement describes the compatibility of an assembly issued by the publisher of that shared assembly. Administrator level policy is a machine version
policy that affects all applications. Administrator policy is created using the same XML syntax as application level policy. The
administrator policy file is called machine.config, and resides in the common language runtime install directory. The three policy levels are evaluated
in the following order:
- Application Policy
- Publisher Policy
- Administrator Policy
[This sample can be found at C:\DevFusion.Data\legacy\quickstart.developerfusion.co.uk\QuickStart\howto\samples\assemblies\version\]
Microsoft .NET Framework SDK QuickStart Tutorials Version 2.0
Copyright � 2004 Microsoft Corporation. All rights reserved.