Category: Enterprise Library

  • Add Additional Information to Your Exceptions

    When Enterprise Library was called Microsoft Application Blocks, if you wanted to log an Exception, you would write (assuming “ex” is an Exception): ExceptionManager.Publish(ex) And if you wanted to log some extended properties you could do something like this: NameValueCollection customerInfo = new NameValueCollection(); customerInfo.Add(“name”,”scott”); customerInfo.Add(“email”,”blah@blah.com”); ExceptionManager.Publish(ex,customerInfo); Now that I am upgrading all legacy code […]

  • Exception Handling Block Error

    Ran into the error: There were no types found in the assembly 'MyAssembly' that implement or inherit from the base type 'System.Exception'. when trying to add a custom Exception Policy in the new Enterprise Library Exception Handling Application Block. After finding Jason's Post I saw the relevance to my problem. I copied all my references […]