Coder Perfect

In.NET, how do I enable assembly bind failure logging (Fusion)?


In.NET, how can I turn on assembly bind failure logging (Fusion)?

Asked by user32736

Solution #1

To this, add the following values:

DWORD ForceLog set value to 1
DWORD LogFailures set value to 1
DWORD LogResourceBinds set value to 1
DWORD EnableLog set value to 1
String LogPath set value to folder for logs (e.g. C:\FusionLog\)

Make sure the folder name contains a backslash and that the folder exists.

To compel the software you’re using to read those registry settings, you’ll need to restart it.

Don’t forget to switch off fusion logging when it’s not in use.

Answered by Gary Kindel

Solution #2

My regular configuration for the Fusion Log Viewer (Fuslogvw.exe from a Visual Studio command prompt or Fusion Log Viewer from the start menu) is:

When you’re finished, remember to log out!

(I just submitted this in response to a similar question, and I believe it applies here as well.)

Answered by Mike Goatly

Solution #3

If you have the Windows SDK installed, look for the “Fusion Log Viewer” under Microsoft SDKTools (on Vista or Windows 7/8, type “Fusion” in the start menu). Launch it, then select “Log bind failure” or “Log all binds” from the Settings menu.

Return to the start menu, right-click the Log Viewer, and select “Run as Administrator” if these buttons are disabled.

Answered by Samuel Jack

Solution #4

To enable FL:, run this Powershell script as an administrator.

Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name ForceLog         -Value 1               -Type DWord
Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogFailures      -Value 1               -Type DWord
Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogResourceBinds -Value 1               -Type DWord
Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogPath          -Value 'C:\FusionLog\' -Type String
mkdir C:\FusionLog -Force

and this one to turn off:

Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name ForceLog
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogFailures
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogResourceBinds
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogPath

Answered by Tereza Tomcova

Solution #5

Set the registry value as follows:

[HKEY LOCAL MACHINE\SOFTWARE\Microsoft\Fusion!EnableLog] to 1 (DWORD)

Set the value to 0 or remove it to disable it.

[update]: In Windows Registry Editor, save the following text to a file, such as FusionEnableLog.reg:

Windows Registry Editor Version 5.00


Then, using Windows Explorer, run the file, ignoring the warning about probable damage.

Answered by user32736

Post is based on