I needed to upgrade one of third party library in my Sitecore solution and I expect it would be as easy as entering a few commands through the package manager console in Visual Studio. Which sure enough it did and installed the new version in my projects and I can build successfully but to my surprise when I tried to browse the homepage it just keeps loading infinitely.
Curious on what could cause this, I tried to isolate the problems to the recent dlls changes that I did and sure enough it was because of that. But there’s no exception logged in Sitecore logs, the page didn’t return a runtime error either.
It took a while to figure this one out but essentially I found out that our Dependency Injection setup actually throws an exception (which isn’t logged anywhere) whenever it failed to load an assembly. The exception that was thrown was pretty generic and didn’t capture which assembly is failing to load.
I finally was able to isolate the problematic assemblies by using the Assembly Binding Log Viewer and update the registry to enable logging
reg add HKLM\Software\Microsoft\Fusion /v EnableLog /t REG_DWORD /d 1
In my case, the third party library that I was using has a dependency to a lower version of System.Net.Socket that I have which I managed to fix with a few assembly binding redirects.