views:

35

answers:

2

I'd like to use the Caching Handler:

http://msdn.microsoft.com/en-us/library/ff648868.aspx

I may want to use some of the other features of the enterprise library, as well. Can someone point me to a reference to know the references I need to add or provide a heuristic for which modules to include?

A: 

Once you've installed entlib then, from the link you posted and your question, these are the ones I believe that you're looking for:

  • Enterprise Library Policy Injection Application Block
  • Enterprise Library Caching Application Block
  • Enterprise Library Caching Data Provider (maybe)
  • Enterprise Library Caching Cryptography Provider
  • Enterprise Library Exception Handling Application Block
  • Enterprise Library Exception Handling Logging Provider (most likely needed as well)
  • Enterprise Library Logging Application Block
  • Enterprise Library Logging Application Block Database Provider (if you intend to log to a db)
  • Enterprise Library Validation Application Block
  • Enterprise Library Validation Application Block ASP.NET Integration (web)
  • Enterprise Library Validation Application Block WinForms Integration (win)

Otherwise, they're all well named in the add reference dialog. They all start with either "Enterprise Library ..." or "Microsoft.Practices. ...". And again, they're all pretty obvious as to what they do.

We don't use all of the app blocks here, but so far the only pattern/heuristic I've noticed is to manually add any "... Provider" reference manually, or you'll get non-obvious errors (Exception Handling Logging Provider is the most common). The config ui doesn't always add all of the references needed.

SnOrfus
@Snorfus thanks for this answer but I will provide a better answer for future readers.
Curtis White
A: 

The namespace is

using Microsoft.Practices.EnterpriseLibrary.PolicyInjection.CallHandlers;

For a discuss on the libraries required refer to the Developer's Guide For Enterprise Library:

http://entlib.codeplex.com/releases/view/46741

Pages 16 and 17.

Assemblies and References It's not uncommon, when people first look at Enterprise Library, to see a look of mild panic spread across their faces. Yes, there are quite a few assemblies, but remember:  You only need to use those directly connected with your own scenario.  Several are required for only very special situations.  The runtime assemblies you will use in your applications are mostly less than 100 KB in size; and the largest of all is only around 500 KB.  In most applications, the total size of all the assemblies you will use will be between 1 and 2 MB. Developer's Guide to Microsoft Enterprise Library 5.0 (Release Candidate) 17 The assemblies you should add to any application that uses Enterprise Library are the common (core) assembly, the Unity dependency injection mechanism (if you are using the default Unity container), and the container service location assembly: Microsoft.Practices.EnterpriseLibrary.Common.dll Microsoft.Practices.Unity.dll Microsoft.Practices.Unity.Interception.dll Microsoft.Practices.ServiceLocation.dll

Curtis White