我遇到了这个错误,想不出有什么遗漏:如何打开C#中的程序集绑定日志记录?
{"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。
非常感谢您的提示。我没有在... \ v7.0A \ ...文件夹中找到FusLogVw.exe,我在... \ v6.0A \ ...文件夹中找到了一个。但是,即使我的C#在异常窗口中显示报告,该日志查看器也不会显示任何失败。如果我更改设置以将所有绑定记录到磁盘,则可以看到大约20个程序集已加载,并且都说“操作成功”。在C#异常窗口中,它仍然告诉我'程序集绑定记录被关闭'。我是否必须在... \ v7.0A \ ...文件夹中找到一个文件夹,因为我使用的是C#express 2010? – newman 2010-11-11 12:33:53
我不太确定,因为我不清楚Fusion如何对待v2.0和v4.0程序集(如果有的话)。一个想法是安装Win7 SDK并尝试从那里运行Fuslogvw.exe,因为它可能依赖于运行时。然而,这只是猜测。奇怪的是,你得到2个不同的结果... – codekaizen 2010-11-11 18:24:25