How do I enable assembly bind failure logging (Fusion) in .NET?
Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion! EnableLog]. Include the backslash after the folder name and that the Folder exists.
The Fusion Log Viewer does all that for you. Go to Start -> Programs -> Visual Studio xxxx > Visual Studio Tools > Visual Studio Command Prompt (run as admin) and type "fuslogvw". In Settings you adjust the logging. To turn on/off logging handy, I've created .
You must run fuslogvw.exe with administrator privileges. This tool is automatically installed with Visual Studio. To run the tool, use Visual Studio Developer Command Prompt or Visual Studio Developer PowerShell with administrator credentials. The viewer displays an entry for each failed assembly bind.
FusionLog folder is not part of SolarWinds and is a folder created by Microsoft. The way this works is Microsoft has its libraries and we use them as a client. Fusion logging is extra logging that we can sometimes use to see underlying issues that our logs might have not caught.
Add the following values to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion Add: 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 you include the backslash after the folder name and that the Folder exists.
You need to restart the program that you're running to force it to read those registry settings.
By the way, don't forget to turn off fusion logging when not needed.
I usually use the Fusion Log Viewer (Fuslogvw.exe from a Visual Studio command prompt or Fusion Log Viewer from the start menu) - my standard setup is:
c:\FusionLogs
(Important: make sure that you have actually created this folder in the file system.)Remember to turn of logging off once you're done!
(I just posted this on a similar question - I think it's relevant here too.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With