Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 470
user32736 Avatar asked Nov 01 '08 08:11

user32736


People also ask

How do I disable assembly binding logging?

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.

How do I disable fusion logging?

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 .

How do I open Fuslogvw EXE?

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.

What is FusionLog?

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.


2 Answers

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.

enter image description here

like image 136
Gary Kindel Avatar answered Sep 19 '22 13:09

Gary Kindel


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:

  • Open Fusion Log Viewer as administrator
  • Click settings
  • Check the Enable custom log path checkbox
  • Enter the location you want logs to get written to, for example, c:\FusionLogs (Important: make sure that you have actually created this folder in the file system.)
  • Make sure that the right level of logging is on (I sometimes just select Log all binds to disk just to make sure things are working right)
  • Click OK
  • Set the log location option to Custom

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.)

like image 22
Mike Goatly Avatar answered Sep 19 '22 13:09

Mike Goatly