We’ve all had it before: referencing some libraries, recompiling the project and then the variation on the DLL hell: the assembly hell.
Suddenly one of your assemblies (or on of its dependent assemblies) doesn’t load anymore.
Debugging this can be done by using FusLogVw: Start the VS command prompt as an administrator, type : FusLogVw and the “Assembly Binding Log Viewer” is shown. Click on the “Settings…” button to enable logging of assembly loading and test your program. If you don’t start the tool as an administrator you won’t be able to change the loggings settings, as some HKLM registry keys are updated for this.
The logging in the FusLogVw window isn’t live: you need to refresh from time to time to see some results. Now find the assembly that is causing troubles and double click on the line. This will explain how FusLogVw tried to resolve the path to your assembly. No indication is given on the line that it failed, you only find that information when you double click the line. On the other hand you probably have the name and version of the assembly that fails to load anyway, so this isn’t a real problem.
Maybe you need to adjust some bindingRedirects in your app.config file, or if it is for the whole system in the C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config file.
<assemblyIdentity name=”Microsoft.Practices.RecipeFramework” publicKeyToken=”b03f5f7f11d50a3a” culture=”neutral”/>
<bindingRedirect oldVersion=”1.0.51206.0-184.108.40.206″ newVersion=”220.127.116.11″/>
[ … ]