Using EL COnfiguration Console to add Exception Types

Topics: Exception Handling Application Block
Feb 2, 2012 at 11:38 AM

Hi,

Im facing strange error while trying to add several custom Exception Types from my binary -exe.

Once a have added one, i can not add any more - no matter if this is my lib, or custom System.Exception.

I get an error -

An error occurred executing the command Add Exception Type.

Message: The type 'My.Namespace.Exception1, My.Namespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' cannot be resolve. Please verify the spelling is correct or that the full name is provided.

Error message: The type 'My.Namespace.Exception1, My.Namespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' cannot be resolve. Please verify the spelling is correct or that the full name is provided.

 

Why?????????

Once i use some default classes exceptions everythin works fine - i can add as much as i like. Should it be designed somehow or...?????

 

PLEASE HELP!!!!

Feb 3, 2012 at 3:57 AM

The issue is that the configuration tool tries to resolve the type specified in the type string and it's not able to resolve that type.

The workaround is to place the the assemblies (and all dependent assemblies) in a location where they can be resolved.  Practically this is in the GAC or in the working directory of the configuration tool (e.g. C:\Program Files (x86)\Microsoft Enterprise Library 5.0\Bin).

If you copy your assemblies to the config tool directory then that should resolve the errors you are seeing.

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com