c# - 错误 : "is not an attribute class" when using ConfigurationElementType attribute

标签 c# visual-studio-2010 enterprise-library

我正在尝试为企业库 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/

相关文章:

双数的 C# 问题

c# - Visual Studio 2010 : Stop debugger at breakpoint overnight = Freeze after the next step

c++ - DHCPSAPI DhcpAddServer 链接器错误

c# - 获取 SqlConnection 失败原因

.net - 使用 Entity Framework 使用 SQL Azure 进行 transient 故障处理

c# - 如何同时构建字符串?

C# - 如何交出哪个线程从串行端口读取?

c# - 单元测试 SqlFunctions

visual-studio-2010 - Debug.WriteLine 未将输出写入 Visual Studio 2010 中的 OutputWindows

c# - 企业库验证 block