Delen via


Updating Application Block Assemblies

If an upgraded version of an Enterprise Library Application Block becomes available, you can install the new version and have all applications use the updated assembly. However, if the new version introduces compatibility problems for certain applications, you can install the new version in the global assembly cache and configure some applications to use the updated version, while others continue to use the earlier version.

Updating Private Assemblies

If an Enterprise Library application block assembly has been deployed as a private assembly, you can deploy the upgrade by just replacing the earlier version of the DLL in the application folder hierarchy with the new one.

Note

You should keep a copy of the earlier version so that if you experience any compatibility issues with the new assembly, you can revert to the earlier version.

Updating Shared Assemblies

The easiest way to upgrade an Enterprise Library application block assembly in a shared configuration is to install the updated DLL in the global assembly cache. By default, the common language runtime (CLR) tries to load the assembly that has the latest build and revision numbers, but the same major and minor version numbers, as the assembly the application was built with. Therefore, if the major and minor version numbers have not changed, adding the later version to the global assembly cache automatically updates all applications that refer to the application block assembly.

If the major or minor version numbers are incremented, or if the new version causes compatibility problems with existing applications, you can override the default version policy. To specify that a particular version of an assembly is used, edit the application's configuration file (for individual applications), or the machine policy file. Alternatively, you can distribute the new version of the assembly with a publisher policy file to redirect assembly requests to the new version.