EntLib 4.1 Configuration Tool - Misbehaving Type Selector

Topics: Building and extending application blocks, Exception Handling Application Block
Feb 16, 2010 at 7:16 PM

Hello everyone.  I'm new to EntLib and so there's probably a lot I don't grasp yet.  I am having an odd problem.  Yes, I went through using the strong dll's from MS and had funny little problems, mostly in that it couldn't find/use my own custom exceptions.

So I gave that up and recompiled the entire thing from the EntLib41Src directory using the BuildLibraryAndCopyAssemblies script.

That seemed to clear up the problem but I've noticed that while I'm editing my VS2008 VB project, if I create a new custom exception class it doesn't show up in the config tool. 

  1. So I rebuild the entire solution and try again - not there.
  2. Then, using the selector tool I load from my dll file - not there.
  3. I exit VS2008 entirely and restart it, open up the app.config with the tool, tell it to load my file and I get an error about being in the same subdir as the assemblies.
  4. So I exit the tool, rebuild the solution and, voila, there are my new exceptions.

I have to do this every time I add exception classes.  Is there some explanation/solution for this behavior?  Is anyone else having this?

Right now, it's a little pain in the neck, but I want to make sure it isn't some harbinger of bigger problems.



Feb 17, 2010 at 2:38 AM
Edited Feb 17, 2010 at 5:58 AM


Do you mean custom exception handler classes?

[Update] I tried both of them (Custom Exception Class and Custom Exception Handler class) and they seem to be working fine, they appeared in the type selector tool. did try searching for the said class using the selector tool? You can also just manually input the full type name.

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.

Feb 17, 2010 at 1:12 PM
Well, I am using custom exceptions that inherit from Exception. Is
thatwhat you're calling an Exception Handler?

For example, I am throwing a "LeaseUnavailableException" when
something goes wrong in my code. I want to use the Config tool to
select that so I can add it to a Policy.

That's the scenario.

Feb 18, 2010 at 12:32 AM

No, that's not what he's referring to, Exception Handlers are those that inherit from IExceptionHandler. 

I think what's happening is that the assembly where your custom exception is in is already loaded in the current AppDomain.  Selecting that assembly again won't load a new version of it, it will just return the existing one.  (Related thread -http://entlib.codeplex.com/Thread/View.aspx?ThreadId=34063)  But I'm curious what is the exact error message you mentioned in #3?


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.