Help. Error EnterpriseLibrary.Logging

Topics: Exception Handling Application Block, Logging Application Block
Jan 25, 2008 at 1:29 AM
Edited Jan 25, 2008 at 4:02 AM
I am new to EL, using version 3.1 in Visual Studio 2005. I built a simple prototype in a Windows forms app to generate a file IO error. I used the EL Configuration Editor from VS 2005 to set up my Exception Policy, handlers, etc. I first got an exception in the call to ExceptionPolicy.HandleException.

occurs here:
Catch ex As FileNotFoundException
Dim boolrethrow As Boolean = ExceptionPolicy.HandleException(ex, My.Settings.PolicyNameStartup)

I have one Exception Policy ("Startup Policy"). I have two exceptions, both with replace handlers.
That's it. I think v. simple. I had Logging handlers, but removed them to boil it down to bare essentials.

info about my EL assemblies:
I added references for each required DLL from .NET tab of Add Reference of VS 2005:

Version : v2.0.50727
Strong Name: False

        • Is this an issue, bec. Strong Name is False? *******

Strong Name: True

Strong Name: True

Strong Name: True

Strong Name: True

ver: 1.0.51206.0
Strong Name: True

So much thanks in advance, friends.

Jan 25, 2008 at 4:20 AM
I fixed it. The culprit was:


I could not find it under the .NET tab in Add References, because I think when EL 3.1 installs and you build the application block assemblies, the strong named DLL get registered in the framework and appear there.

It is the aseembly description that threw me off. I was looking for: Microsoft.Practices.EnterpriseLibrary.Common.dll

But it is listed as "Enterprise Library Shared Library". This is the strong-named assembly. It fixed my issues.

If anyone else gets issues with exceptions in your Application Blocks, amke sure you use strong-name versions of the assemblies from EL 3.1.
If you're using them as is, that is.