Can't load assembly with custom exception

Topics: Exception Handling Application Block
Jul 7, 2008 at 11:31 PM
Edited Jul 7, 2008 at 11:33 PM
Hi,
I'm facing the following problem:
1. In the configuration tool I right click on a policy I created and select New> Exception Type
2. The type selector dialog is openen and I click 'Load and Assembly'
3. I select a dll of a project in which I have the following class:

public

class EntityExistsException : Exception

 

 

{

    public EntityExistsException() : base("Entity already exists in DB")

 

    {

    }

}

4. I get a message saying "There were no types found in assembly {assmbly name} that implement or inherit from the base type 'System.Exception'"

I can't figure out why am I getting this message. is there something I'm missing? some known bug?
Thank you,
Ken

 

Jul 8, 2008 at 2:41 PM
Edited Jul 8, 2008 at 2:42 PM
Hi,

Once the configuration tool loads the an assembly it will not reload it if it has changed. Was your exception added to your project during your VS session? Can you retry after restarting VS?

Fernando


ken_saraf wrote:
Hi,
I'm facing the following problem:
1. In the configuration tool I right click on a policy I created and select New> Exception Type
2. The type selector dialog is openen and I click 'Load and Assembly'
3. I select a dll of a project in which I have the following class:

public

class EntityExistsException : Exception

 

 

{

    public EntityExistsException() : base("Entity already exists in DB")

 

    {

    }

}

4. I get a message saying "There were no types found in assembly {assmbly name} that implement or inherit from the base type 'System.Exception'"

I can't figure out why am I getting this message. is there something I'm missing? some known bug?
Thank you,
Ken

 




Jul 8, 2008 at 6:17 PM
Thank you! That was it.
Ken