调试.NET程序集绑定又名查找DLL什么用,为什么 [英] Debug .NET assembly binding aka Find what dll is used and why

查看:203
本文介绍了调试.NET程序集绑定又名查找DLL什么用,为什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在对我们引用的DLL运行时加载一些神秘的版本不匹配。

We're having some mystery version mismatches on our referenced dll's loaded at runtime.

这样的错误:

无法加载文件或程序集X或它的一个依赖。找到的程序集清单定义不匹配的程序集引用。 (从HRESULT异常:0x80131040)

Could not load file or assembly X or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

有什么办法组装调试结合。

Is there any way to debug the assembly binding.

在换句话说,我怎么能知道加载的程序集以下细节:

In other words, how can I know the following details about loaded assemblies:

  • 版本
  • 位置
  • 谁/什么原因造成的负荷(我的code,另外一个.dll文件,...)
  • 好了,只是一切有知道...

推荐答案

的的程序集绑定日志查看器(又名融合日志查看器,fuslogvw.exe)显示了这些各种各样的问题,如有用的数据:

The Assembly Binding Log Viewer (aka Fusion Log Viewer, fuslogvw.exe) shows useful data for these sorts of issues such as:

  • 在什么样的流程正在试图加载程序集
  • 的组件(版本,区域性,公钥标记)的完整名称
  • 这是造成负载的组件
  • 在哪些路径进行探查组装

您可以记录所有绑定或只是绑定失败。

You can log all binds or just bind failures.

fuslogvw.exe应便于直接从任何VS命令提示符。

fuslogvw.exe should be accessible directly from any VS command prompt.

这篇关于调试.NET程序集绑定又名查找DLL什么用,为什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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