Assembly Binding Log Viewer (Fuslogvw.exe)
The Assembly Binding Log Viewer displays details for assembly binds. This information helps you diagnose why the .NET Framework cannot locate an assembly at run time. These failures are usually the result of an assembly deployed to the wrong location or a mismatch in version numbers or cultures. The common language runtime's failure to locate an assembly typically shows up as a TypeLoadException in your application.
- Run Fuslogvw.exe from the SDK Command Prompt.
The viewer displays an entry for each failed assembly bind. For each failure, the viewer describes the application that initiated the bind; the assembly the bind is for, including name, version, culture and public key; and the date and time of the failure.
Select the Default option button to view bind failures for all application types. By default, log entries are stored in per-user directories on disk in the wininet cache.
Select the Custom option button to view bind failures in a custom directory that you specify. You must specify the custom location where you want the runtime to store the logs by setting the custom log location in the Log Settings dialog to a valid directory name. This directory should be clean, and only contain files that the runtime generates. If it contains an executable that generates a failure to be logged, the failure will not be logged because the tool tries to create a directory with the same name as the executable. In addition, an attempt to run an executable from the log location will fail.
Note
The default bind location is preferable to the custom bind location. The runtime stores the default bind location in the wininet cache, and therefore automatically cleans it out. If you specify a custom bind location, you are responsible for cleaning it out.
Select the application name of the desired entry in the viewer.
Click the View Log button. Alternately, you can double-click the selected entry.
The tool displays the following details about the selected bind failure:
The specific reason the bind failed, such as "file not found" or "version mismatch".
Information about the application that initiated the bind, including its name, the application's root directory (AppBase), and a description of the private search path, if there is one.
The identity of the assembly the tool is looking for.
A description of any Application, Publisher, or Administrator version policies that have been applied.
Whether the assembly was found in the global assembly cache.
A list of all probing URLs.
The following sample log entry shows detailed information about a failed assembly bind.
** Assembly Binder Log Entry (3/5/2002 @ 12:54:20 PM) **
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\WINNT\Microsoft.NET\Framework\v1.0.3705\fusion.dll
Running under executable C:\Program Files\Microsoft.NET\FrameworkSDK\Samples\Tutorials\resourcesandlocalization\graphic\cs\graphicfailtest.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = graphicfailtest.resources, Version=0.0.0.0, Culture=en-US, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = C:\Program Files\Microsoft.NET\FrameworkSDK\Samples\Tutorials\resourcesandlocalization\graphic\cs\
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : graphicfailtest, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: Processing DEVPATH.
LOG: DEVPATH is not set. Falling through to regular bind.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: graphicfailtest.resources, Version=0.0.0.0, Culture=en-US, PublicKeyToken=null
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft.NET/FrameworkSDK/Samples/Tutorials/resourcesandlocalization/graphic/cs/en-US/graphicfailtest.resources.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft.NET/FrameworkSDK/Samples/Tutorials/resourcesandlocalization/graphic/cs/en-US/graphicfailtest.resources/graphicfailtest.resources.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft.NET/FrameworkSDK/Samples/Tutorials/resourcesandlocalization/graphic/cs/en-US/graphicfailtest.resources.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft.NET/FrameworkSDK/Samples/Tutorials/resourcesandlocalization/graphic/cs/en-US/graphicfailtest.resources/graphicfailtest.resources.EXE.
LOG: All probing URLs attempted and failed.
Select an entry in the viewer.
Click the Delete Entry button.
- Click the Delete All button.
- Click the Refresh button. The viewer does not automatically detect new log entries while it is running. You must use the Refresh button to display them.
- Click the Settings button to open the Log Settings dialog.
- Click the About button.
You can use the Log Settings dialog to perform the following actions.
- Select the Log disabled option button. Note that this option is selected by default.
Select the Log in exception text option button.
See the Important note regarding assemblies that are loaded as domain neutral.
Select the Log bind failures to disk option button.
See the Important note regarding assemblies that are loaded as domain neutral.
Select the Log all binds to disk option button.
See the Important note regarding assemblies that are loaded as domain neutral.
Important
When an assembly is loaded as domain neutral, for example by setting the LoaderOptimization property to System.LoaderOptimization.MultiDomain or System.LoaderOptimization.MultiDomainHost, turning on logging might leak memory in some cases. This can happen if a log entry is made when a domain-neutral module is loaded into an application domain, and later the application domain is unloaded. The log entry might not be released until the process ends. Some debuggers automatically turn on logging.
Select the Enable custom log path option button.
Enter the path into the Custom log path text box.
Note
The Assembly Binding Log Viewer (Fuslogvw.exe) uses the Internet Explorer (IE) cache to store its binding log. Due to occasional corruption in the IE cache, the Assembly Binding Log Viewer (Fuslogvw.exe) can sometimes stop showing new binding logs in the viewing window. As a result of this corruption, the .NET binding infrastructure (fusion) cannot write to or read from the binding log. (This issue is not encountered if you use a custom log path.) To fix the corruption and allow fusion to show binding logs again, clear the IE cache by deleting temporary internet files from within the IE Internet Options dialog.
If your unmanaged application hosts the common language runtime by implementing the IHostAssemblyManager and IHostAssemblyStore interfaces, log entries can't be stored in the wininet cache. To view log entries for custom hosts that implement these interfaces, you must specify an alternate log path.
.NET Framework Tools
TypeLoadException Class
SDK Command Prompt