How do you fix “Could not load file or assembly or one of its dependencies”

How do you fix “Could not load file or assembly or one of its dependencies”

This runtime exception is more likely to occur when multiple versions of the same assembly are used. It’s simple to fix as long as the new assembly version is backwards compatible.

The system was unable to load the assembly file ‘Episerver.Forms.Core‘. There are a few solutions to this problem:

  1. The dll file may not be in /bin folder. Just copy the dll file to /bin folder or set this preference Copy Local = True from Visual Studio.
  1. If the problem persists, check to see if the referenced assembly’s version differs from the one it’s looking for. The v4.7.0 assembly is mentioned in the first image, however it is actually the 4.6.1 version. In web.config, look for the dependentAssembly> setting:

and in the packages.config file:

This shows a mismatching dll version. When you downgrade Forms from 4.7.0 to 4.6.1, the bindingRedirect setting may not be updated. Reload the website with newVersion = “4.6.1.0” set.

leave your comment

Your email address will not be published.

Top