Exception handling & logging with Enterprise library 4.1

Topics: Exception Handling Application Block, Logging Application Block
Jul 15, 2009 at 2:00 PM

Hi all,

I'm using Enteprise library for Logging && Exception Handling. I've created my own custom exception handlers. All is running well on my computer where I've got Enterprise Library installed, but suprisingly on the other computer where there is no Enteprise library installed, the implemented exception handling is not working properly. I was expecting that the referenced required libraries 




are enough to make it run on the other computers, but that's not the case. 


Could anyone explain me why it is happening?

Thanks in advance


Jul 15, 2009 at 11:37 PM

You have to consider what these libraries also require to work.  For example if you check out the ExceptionHandling project (entlib source code) you will see that it also requires ObjectBuilder and Unity.

 Do a similar exercise with all the libraries you are including.



Jul 16, 2009 at 4:33 AM

You'll also need to deploy ObjectBuilder2 (as mentioned above), and Microsoft.Practices.EnterpriseLibrary.Common.dll. You don't actually need to deploy Unity unless you're using it directly.

You don't reference these directly in your code, but they are referenced (and used) from the block code.


Jul 16, 2009 at 4:35 AM
Edited Jul 16, 2009 at 4:36 AM

Yes, I would agree with Allan, ObjectBuilder2 and Unity are used by the said assemblies. If you would notice, when you build your project, even if you only reference the Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll and Microsoft.Practices.EnterpriseLibrary.Logging.dll when you look at the dlls inside the binaries directory, you would have the ObjectBuilder2, Unity and Common.

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.

Jul 16, 2009 at 7:12 AM


I would like to thank all of you much for the support. It indeed helps. When I added the missing ObjectBuilder2 and Unity libraries (Common was present before), everything starts working.  

Many thanks and good luck in all you are doing.