我正在尝试为企业库 5.0 的异常处理 block 创建自定义异常处理程序。据我了解,我需要使用属性开始上课 “[ConfigurationElementType(typeof(CustomHandlerData))]”。但是我收到一条错误消息,指出 ConfigurationElementType 不是属性类。
有人知道会发生什么吗?
最佳答案
尝试在 ConfigurationElementType 之后添加关键字 Attribute。这不是必需的,但这可能会给您带来更有用的错误消息……我猜是您缺少引用……这一直是 EntLib 的问题。
关于c# - 错误 : "is not an attribute class" when using ConfigurationElementType attribute,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6458449/