无法加载文件或程序的log4net或它的一个依赖 [英] Could not load file or assembly log4net or one of its dependencies

查看:302
本文介绍了无法加载文件或程序的log4net或它的一个依赖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直要求看看在其贝宝集成的ASP / C#应用程序错误。错误,完全显示为:

I've been asked to take a look at an error in an ASP/C# application with its Paypal integration. The error, shown in full, is:

无法加载文件或程序
  'log4net的,版本= 1.2.0.30714,
  文化=中立,
  公钥= b32731d11ce58905或
  它的一个依赖。该设
  集清单定义不
  不匹配的程序集引用。
  (异常来自HRESULT:0x80131040)

Could not load file or assembly 'log4net, Version=1.2.0.30714, Culture=neutral, PublicKeyToken=b32731d11ce58905' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

据我了解,这意味着位于实际的文件(也就是在我的bin目录log4net.dll)不匹配基于一些装配配置预计的版本。我遇到的问题是,我不能在这里找到这个文件被引用。

From what I understand, this means that the actual file located (that is, log4net.dll in my bin directory) does not match the version expected based on some assembly configuration. The problem I'm having is that I cannot locate where this file is being referenced.

我可以访问所有文件在网站的Web根目录下,并不能找到引用此DLL的任何配置文件。我可能还有什么地方需要查看,确定是什么导致错配?

I have access to all the files in the web root directory of the site, and cannot locate any config files that reference this DLL. Where else might I need to look to determine what's causing the mis-match?

作为一个说明,我做了肯定,在bin目录中的DLL的版本是最新的,但是这似乎并没有已经解决任何事情。

As a note, I've made sure that the version of the DLL in the bin directory is up to date, but this does not seem to have resolved anything.

推荐答案

您需要控制项目中引用,以及 - 引用被编译成汇编本身并试图加载。我的猜测是,你有一个过时的参考log4net的集会,但使用的是最新版本。

You need to control the references in projects as well - the references are compiled into the assembly itself and will attempt a loading. My guess is, you have an outdated reference to the log4net assembly but are using the latest version.

这篇关于无法加载文件或程序的log4net或它的一个依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆