Tuesday 3 September 2013

How to check Assembly related errors using Fusion Log utility


One of most annoying exceptions we developer get is assembly found doesn't match with loaded assembly, even though we put right assembly in GAC. There can be tens of reason as why assembly loaded doesn't match and that's where fusion log utility helps.

In order to use this utility you need to have installed Microsoft SDKs or it gets installed when you installed visual studio. I have installed Visual Studio 2008 on Windows Server 2003 so my guide will be based on it.

Open Visual Studio 2008 command prompt and navigate to directory

C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin>

Now type fuslogvw.exe and you will see a windows appears as shown below,




Click on settings and check box Log all binds to disk as shown, you can also select "Custom log path" but make sure directory exists.

If your log was disabled before then you might need to do a IIS reset to make it start working. (it took mine around 30 minutes to pick up errors because of unknown reasons).

You will see logs as shown in picture below,


And clicking on any log will open it in browser as it's a html file, as shown below.



Make sure to disable log afterwords as otherwise they will take a lot of space within short time.

No comments:

Post a Comment