小编use*_*593的帖子

为什么我必须在客户端代码中引用ExceptionHandling.Logging dll?

我有一个编译成dll的数据访问层.在这个层中,我使用Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll来记录异常,然后将它们扔回调用者.

我有一个引用数据访问层DLL的客户端应用程序,但没有直接调用Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll.当数据访问层中发生异常时,我在客户端代码中遇到以下运行时异常,除非我从客户端应用程序添加对Enterprise Library dll的引用.

类型 'Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler,Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging,版本= 5.0.414.0,文化=中性公钥= 31bf3856ad364e35' 无法解析.请验证拼写是否正确或是否提供了完整的类型名称.

我不明白为什么客户端必须引用Enterprise Library dll,即使它没有在代码中引用它.

任何想法将不胜感激.

enterprise-library c#-4.0

4
推荐指数
1
解决办法
6101
查看次数

标签 统计

c#-4.0 ×1

enterprise-library ×1