How to enable assembly bind failure logging (Fusion) in .NET

后端 未结 13 2777
难免孤独
难免孤独 2020-11-21 04:50

How do I enable assembly bind failure logging (Fusion) in .NET?

相关标签:
13条回答
  • 2020-11-21 05:38

    Just a tiny bit of info that might help others; if you do something along the lines of searching all assemblies in some directory for classes that inherit/implement classes/interfaces, then make sure you clean out stale assemblies if you get this error pertaining to one of your own assemblies.

    The scenario would be something like:

    1. Assembly A loads all assemblies in some folder
    2. Assembly B in this folder is stale, but references assembly C
    3. Assembly C exists, but namespaces, class names or some other detail might have changed in the time that has passed since assembly B became stale (in my case a namespace was changed through a refactoring process)

    In short: A ---loads--> B (stale) ---references---> C

    If this happens, the only telltale sign is the namespace and classname in the error message. Examine it closely. If you can't find it anywhere in your solution, you are likely trying to load a stale assembly.

    0 讨论(0)
  • 2020-11-21 05:41

    I wrote an assembly binding log viewer named Fusion++ and put it on GitHub.

    You can get the latest release from here or via chocolatey (choco install fusionplusplus).

    I hope you and some of the visitors in here can save some worthy lifetime minutes with it.

    0 讨论(0)
  • 2020-11-21 05:43

    In my case helped type disk name in lower case

    Wrong - C:\someFolder

    Correct - c:\someFolder

    0 讨论(0)
  • 2020-11-21 05:44

    Just in case you're wondering about the location of FusionLog.exe - You know you have it, but you cannot find it? I was looking for FUSLOVW in last few years over and over again. After move to .NET 4.5 number of version of FUSION LOG has exploded. Her are places where it can be found on your disk, depending on software which you have installed:

    C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64

    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64

    C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64

    C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools

    C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools

    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin

    0 讨论(0)
  • 2020-11-21 05:45

    If you already have logging enabled and you still get this error on Windows 7 64 bit, try this in IIS 7.5:

    1. Create a new application pool

    2. Go to the Advanced Settings of this application pool

    3. Set the Enable 32-Bit Application to True

    4. Point your web application to use this new pool

    0 讨论(0)
  • 2020-11-21 05:46

    The Fusion Log Settings Viewer changer script is bar none the best way to do this.

    In ASP.NET, it has been tricky at times to get this to work correctly. This script works great and was listed on Scott Hanselman's Power Tool list as well. I've personally used it for years and its never let me down.

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