Debug .NET assembly binding aka Find what dll is used and why

后端 未结 2 651
甜味超标
甜味超标 2021-01-06 20:23

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

Errors like:

Could not load file or assembly X or on

相关标签:
2条回答
  • 2021-01-06 21:05

    Totally agree with Chris, Assembly Binding Log Viewer should give you all information you need. In addition you could also use WinDbg + SOS.dll. Mostly it's used for debugging but can be quite useful in some other cases when you need to know as much information as possible. The only problem that could stop you is that it doesn't have nice UI like VS debugger :)

    Good luck!

    0 讨论(0)
  • 2021-01-06 21:06

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

    • What process is trying to load an assembly
    • The full name of the assembly (version, culture, public key token)
    • The assembly that's causing the load
    • Which paths were probed for the assembly

    You can log all binds or just bind failures.

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

    0 讨论(0)
提交回复
热议问题