Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Deploying the Caching 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 Caching Application Block is comprised of multiple assemblies. Each assembly that belongs to the Caching Application Block has a file name that begins with Microsoft.Practices.EnterpriseLibrary.Caching. Additionally, the application block depends on the common assembly and on the ObjectBuilder subsystem. Depending on the configuration of the application using the application block, it may also require the Data Access Application Block assemblies as well as some of the Security Application Block and Cryptography Application block assemblies. An application that uses the Caching 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 Caching Application Block as Private Assemblies

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

Deploying the Caching Application Block as Shared Assemblies

You can assign a strong name to the Caching Application Block assemblies. Both Visual Studio .NET and the .NET Framework SDK include tools to do this. After assemblies are strong named, they can be deployed in a shared location and used by multiple applications. You can choose to deploy the assemblies in any file system location and add a <codeBase> element specifying the location of the assemblies in the application configuration file of each application that uses the Caching Application Block. For more information on assigning strong names to the Enterprise Library assemblies see Strong Naming Enterprise Library Assemblies.

A more likely scenario is that you deploy shared assemblies in the global assembly cache. In this scenario, all applications on the computer can use the assemblies without any additional configuration. The global assembly cache also provides support for component services (such as transaction management) and versioning management. 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 Framework configuration tool (Mscorcfg.msc).
  • Move the assembly to 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.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.