Konabos

DLL Reference Mismatch - Sitecore Bug – Troubleshooting easily

Hugo Santos - Head of Search Practice

23 Mar 2023

Share on social media

When migrating an old instance of Sitecore to the latest version of the platform, is not uncommon to find a similar bug to the described one here. Messing with the DLLs version is not that hard, after all.

In this blog, I want to show you an easy step-by-step on how to troubleshoot this kind of issue and not waste hours trying to figure out what is wrong here.

The Issue

In this case, I was getting this exception in a fully functional new Sitecore 10.2 XM instance when trying to open the License Details in the Control Panel, after migrating an old Sitecore 8.2 website to this new one:

This error message indicates that there is a missing or corrupted assembly file required by the Sitecore application. Here are some steps you can take to try and fix the issue:

  • Check the Sitecore logs: Check the Sitecore log files to see if there are any other error messages or warnings that may provide more context on the issue. The logs can be found in the \App_Data\logs folder in your Sitecore instance.
  • Check the system requirements: Verify that your Sitecore installation meets the system requirements for the version you are using. Specifically, check if the required version of the .NET framework is installed on the server. In this case, it seems like the System.Runtime assembly is missing, which is a core component of the .NET framework.
  • Verify the DLL files: Check that the System.Runtime.dll file is present in the \bin folder of your Sitecore application. If it is missing, you may need to reinstall or repair the .NET framework on the server.
  • Check the web.config file: Verify that the web.config file in the root directory of your Sitecore application has the correct assembly references and version numbers specified. In this case, make sure that the assembly binding redirects for System.Runtime is present in the web.config file and is pointing to the correct version.
  • It’s worth checking if any third-party dependency installed is trying to use a different DLL version other than the one used by default by Sitecore. Nuget references are usually a good entry point for your investigation. If you think that this might be happening to you, use and abuse the Microsoft fuslogvw tool, this will for sure save you hours of guessing.
  • Reinstall Sitecore: If the above steps do not resolve the issue, you may need to reinstall Sitecore on the server. Before doing this, make sure to back up your Sitecore databases and files.

It's also worth noting that if you're using Sitecore in a development environment, you may be able to fix the issue by simply restoring the NuGet packages for the project in Visual Studio. This will download and install any missing or corrupted DLL files that may be causing the issue.

Solution 

In my specific case, the issue was a third-party library. As suggested, I’ve used fuslogvw to identify which NuGet reference was the guilty one. Since we are talking about a Sitecore Upgrade project, many NuGet references had to be upgraded too, and one of them was actually upgraded to the wrong version, no longer matching the current Sitecore .Net version.

After it, it was an easy fix: change its version so that it matches our Sitecore .Net version library, and call it a day:

Sign up to our newsletter

Share on social media

Hugo Santos

Hugo specializes in search and automation, including testing automation. He is bright, amiable, and energetic. As a Sitecore Architect, he is passionate about creating great solutions that don't just follow best practices but further them. His passion for doing great work is equaled only by his willingness to share his expertise with the Sitecore community by blogging and advocacy, like helping to organize the Quebec Sitecore User Group while in Canada. Hugo is a four-time Sitecore Technology MVP, in recognition for all that he does for the Sitecore Community.


Subscribe to newsletter