Enable Assembly Binding Logging without FusLogVw
Fusion Log Viewer is a convenient tool to catch weird .net assembly loading problems. It incorporates setting sensitivity levels with providing a semi-useful view of the current logs. Fusion Log Viewer only comes with some of the Microsoft development SDKs. Increasingly I find instances where I can't justify downloading and installing an SDK on a machine just to be able to run Fusion.
All of the capabilities it provides is already available, hidden, in the Windows operating system so all we need to get the benefit of the tool without the SDK is to create some registry keys. There are a few flags to turn on and a path to the logging folder required.
$LogFilePath = 'C:\FusionLog\'
$FusionPath = HKLM:\Software\Microsoft\Fusion
$Flags = @( 'ForceLog', 'LogFailures', 'LogResourceBinds' )
$Flags | ForEach-Object {
Set-ItemProperty -Path $FusionPath -Name $_ -Value 1 -Type DWord
}
Set-ItemProperty -Path $FusionPath -Name LogPath -Value $LogFilePath -Type String
The one slight niggle with this tool is that logs are written as html and don't appear in the folder in any kind of order. Sometimes you just need to work your way through the logs to find the root cause of a loading problem.