c# - 如何在 C# 中打开程序集绑定(bind)日志记录?

标签 c# wpf exception

我遇到了这个错误,无法弄清楚缺少什么:

{"Could not load file or assembly 'xxxxx, Version=1.0.0.42, Culture=neutral, PublicKeyToken=c5067b3d1110b13c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"xxxxx, Version=1.0.0.42, Culture=neutral, PublicKeyToken=c5067b3d1110b13c"}

在详细的异常窗口中,它还告诉我:

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

但是,我无法让它工作。我找到了另一篇关于这个的帖子 here .我尝试了这些条目:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion
Add:
DWORD ForceLog set value to 1
DWORD LogFailures set value to 1
DWORD LogResourceBinds set value to 1
String LogPath set value to folder for logs ie) C:\FusionLog\

但是还是不行。其实我也设置了EnableLog为1。

我做错了什么?有人可以帮忙吗?我在 WinXP 中使用 C# express 2010。

最佳答案

关于c# - 如何在 C# 中打开程序集绑定(bind)日志记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4150980/

相关文章:

c# - 来自 ASP.NET Web 应用程序的 Word 邮件合并

.net - WinForm - WPF 集成;一片一片

c# - 通过 ListCollectionView 的 ObservableCollection 显示不正确的项目列表

wpf - 移至Catel 4.x后CanExecute方法不触发

c - Emacs - GDB 跟踪权可中断,无需单步执行所有文件

c# - 如何在使用 iTextSharp 和 c# 呈现的 PDF 中加入泰卢固语?

c# - 服务器还原数据库失败

c# - "Requested URL cannot be found"在IIS上发布网站时

C++ Try Catch block 不捕获异常

c# - 初始化整数数组