Application Block Dependencies

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.

This topic describes the dependencies between the application blocks; it also describes the dependencies on the core features of Enterprise Library. The introduction of the Unity Application Block in this release of Enterprise Library means that the dependencies can vary if you use the Unity Application Block to create instances of Enterprise Library objects. The following sections describe the dependencies for the common scenarios:

Dependencies for All Application Blocks

All of the application blocks depend on other code included in the Enterprise Library:

  • Core library functionality. The Enterprise Library core provides services such as instrumentation and configuration, and it is a shared dependency of all Enterprise Library application blocks except for the Unity Application Block. The core library functionality is contained in the assembly Microsoft.Practices.EnterpriseLibrary.Common.dll.

    Note

    You can use the Unity Application Block as a stand-alone dependency injection mechanism. To support this feature, this application block contains its own configuration system. Therefore, you can use the Unity Application Block without deploying the configuration system located in the Enterprise Library core.

  • The ObjectBuilder subsystem. The ObjectBuilder subsystem performs all the repetitive and necessary tasks for creating and disposing of object instances, while still providing a high level of flexibility. The ObjectBuilder subsystem is contained in the assembly Microsoft.Practices.ObjectBuilder2.dll.

  • If you want to use the new instance generation and injection capabilities of Enterprise Library, you require the Unity Application Block. This application block implements the container and instance generation mechanism that Enterprise Library uses for tasks such as injecting configuration into block classes and connecting instrumentation classes to application blocks. This application block uses the ObjectBuilder subsystem. For more details, see Changes to Dependencies When Using the Unity Application Block.

For schematic views of the dependencies between the Enterprise Library application blocks, the Enterprise Library core, and ObjectBuilder, see Dependency Schematics.

Additional Dependencies for the Caching Application Block

The following are the additional dependencies when using the Caching Application Block:

  • If you use a database as a backing store, you require the Data Access Application Block.
  • If you want to encrypt data in the cache, you require the Cryptography Application Block.

Additional Dependencies for the Exception Handling Application Block

The following are the additional dependencies when using the Exception Handling Application Block:

  • If you use the Logging Application Block to log exceptions, you need Microsoft.Practices.EnterpriseLibrary.Logging.dll and Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll.
  • In addition, the Exception Handling Application Block might have dependencies on other code, including the Logging Application Block and the Data Access Application Block. The Exception Handling Application Block requires the Logging Application Block when it uses the logging handler. If you configure the Logging Application Block to use the database trace listener, it requires the Data Access Application Block. For more information, see the Logging Application Block documentation and the Data Access Application Block documentation.

Additional Dependencies for the Policy Injection Application Block

The following are the additional dependencies when using the Policy Injection Application Block:

  • The standard handlers provided with the Policy Injection Application Block use features of these Enterprise Library application blocks. However, if your code does not use the built-in handlers, you do not have to deploy the application blocks on which they depend.

  • If you use the Policy Injection Application Block built-in Authorization Handler, you require the Security Application Block.

  • If you use the Policy Injection Application Block built-in Exception Handling Handler, you require the Exception Handling Application Block.

  • If you use the Policy Injection Application Block built-in Logging Handler, you require the Logging Application Block.

  • If you use the Policy Injection Application Block built-in Validation Handler, you require the Validation Application Block.

    Note

    The Policy Injection Application Block built-in Caching Handler uses the ASP.NET cache mechanism; therefore, there is no dependency on the Caching Application Block.

Additional Dependencies for the Security Application Block

The following is the additional dependency when using the Security Application Block:

  • The Caching Application Block. The Security Application Block uses the Caching Application Block to cache security information and then retrieve it when required. You can replace the Caching Application Block with your own caching provider. Depending on how you configure the Caching Application Block, you may also require the Data Access Application Block. For more information, see the Caching Application Block documentation.