Error: "is not an attribute class" when using ConfigurationElementType attribute

Gavin Grant picture Gavin Grant · Jun 23, 2011 · Viewed 11.1k times · Source

I'm trying to create a custom exception handler for the exception handling block of enterprise library 5.0. As far as I understand I need to start the class off with the attribute "[ConfigurationElementType(typeof(CustomHandlerData))]". But I get an error stating the ConfigurationElementType is not an attribute class.

Does anyone know what might be going on?

Answer

therealmitchconnors picture therealmitchconnors · Jun 23, 2011

Try adding the keyword Attribute after ConfigurationElementType. It is not required, but this may get you to a more helpful error message... my guess would be that you are missing references... that's always the problem with EntLib.