Skip to main content

How to enable Assembly Binding Logging (Fusion Log Viewer – fuslogvw.exe)?

If you receive an “Could not load file or assembly” error for your .NET application hosted in IIS, you may need more details to find out exactly which assembly cause the issue. IIS doesn’t show the binding trace as this slows down applications. However, there is a way to enable logging. 

Example of an assembly/DLL binding issue:

Could not load file or assembly ‘Oracle.DataAccess’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

Solution for “Could not load file or assembly” issues

Enable Assembly Binding Logging so that you can see where the binding is failing. There are two ways of enabling it:

  1. Using Registry Editor
  2. Using Fusion Log Viewer (Assembly Binding Log Viewer – fuslogvw.exe)

Using Registry Editor:

  1. Go to “Start > Run
  2. Enter “regedit
  3. Go to this key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion
  4. Change the value of EnableLog to 1. If this key doesn’t exist, create it with DWORD(32-bit) type

Other registry keys for more detailed settings (Reference):

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

In order to solve assembly reference issues, you may need to find out a Public Key Token for an assembly file. Here is how to find it: How to find out the Public Key Token for an assembly (DLL) file?

Using Fusion Log Viewer ( Assembly Binding Log Viewer – fuslogvw.exe)

Another way of viewing details of failed assembly bindings is to use Microsoft’s fuslogvw.exe utility (Reference). It is also called Assembly Binding Log Viewer or Fusion Log Viewer.

This tool is installed with Visual Studio. It should be in your Microsoft SDKs folder (Example path: C:\Program Files (x86)\Microsoft SDKs\Windows\v{SDK version}A\Bin\FUSLOGVW.exe)

You can also run this tool via Visual Studio Command Prompt (Make sure to run the command prompt as Administrator):

Fusion Log Viewer (fuslogvw.exe)
Fusion Log Viewer (fuslogvw.exe)

In order to enable assembly binding by using Fusion Log Viewer:

  1. Run the tool (Click fuslogvw.exe or call it via Visual Studio Command Prompt as explained above)
  2. Click “Settings
  3. Select “Log bind failures to disk
  4. Check “Enable custom log path
  5. Create the folder you want the logs to be recorded (Example: C:\FusionLogs)
  6. Enter the path of this folder into “Custom log path” field
  7. Click “OK

Once enabled it, reproduce the issue. Click “Refresh” in the Fusion Log Viewer. You should see the bind failure listed in the tool. Click “View log” to see the details.

Note: Do not forget to disable assembly binding logging once you complete troubleshooting. This feature may affect your server’s performance.

While troubleshooting assembly issues, you may need to find out the processor architecture of certain files. Here are the quick ways of finding it: How to find out processor architecture (x86, x64) of dll and exe files?

2 thoughts to “How to enable Assembly Binding Logging (Fusion Log Viewer – fuslogvw.exe)?”

Leave a Reply

Your email address will not be published. Required fields are marked *