Share via


Deploying the Exception Handling Application Block

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

The Exception Handling Application Block is comprised of two assemblies. Each assembly that belongs to the Exception Handling Application Block has a file name that begins with Microsoft.Practices.EnterpriseLibrary.ExceptionHandling. Additionally, the application block depends on the Enterprise Library Core. Depending on its configuration, an application that uses the application block may also require the Logging Application Block assemblies and the Data Application Block assemblies. An application that uses the Exception Handling Application Block can be deployed in one of two configurations:

  • It can be deployed as private assemblies in the application folder hierarchy.
  • It can be deployed as shared assemblies in any file system location or in the global assembly cache.

Deploying the Exception Handling Application Block as Private Assemblies

If the application does not have to use the services available from the global assembly cache, the Exception Handling Application Block assemblies can be deployed in the application directory structure. This simplifies deployment because you can install the entire application, including the Exception Handling Application Block assemblies, on the destination computer by using the xcopy command. If multiple applications on the same computer use the Exception Handling Application Block, you can install a copy of the assemblies in each application folder hierarchy. You can update each application's copy of the assemblies independently.

Deploying the Exception Handling Application Block as Shared Assemblies

You can assign a strong name to the Exception Handling Application Block assemblies. This is a recommended practice for security reasons. Both Visual Studio .NET and the .NET Framework SDK include tools for assigning strong names. After you assign a strong name to the assemblies, you can deploy them in a shared location and multiple applications can use them. You can choose to deploy the assemblies in any file system location, and then add a <codeBase> element to specify their location in the application configuration file of each application that uses the Exception Handling Application Block. For information on strong naming Enterprise Library assemblies, see Strong Naming Enterprise Library Assemblies.

You can also deploy shared assemblies in the global assembly cache, which lets all applications on a computer use the assemblies without any more configuration. You can do one of the following to install an assembly in the global assembly cache:

  • Use an installer program, such as the Microsoft Windows Installer, version 2.0.
  • Use the Global Assembly Cache Tool command line utility (Gacutil.exe).
  • Use the .NET Admin Microsoft Management Console (MMC) snap-in (Mscorcfg.msc).
  • Drag and drop the assembly into the assembly folder.
Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.