DLL versioning error DLL versioning error asp.net asp.net

DLL versioning error


Now I know that I do have a dependency on this DLL, but I have version 0.85.5 on my system. I have systematically deleted every older version of the DLL from the server, recompiled everything and republished.

Sounds like the 'dependency' is expecting the OLDER version of the DLL. Why not REPLACE all copies of the NEWER version (0.85.5) on your system, with the OLDER version (0.85.3.365)? (Make sure to check both the 'bin' folder of your web application and the 'GAC': c:\windows\assemblies)

If you need, you can download the older version here: http://sourceforge.net/projects/sharpdevelop/files/SharpZipLib/0.85.3/

NOTE:

  • After replacing the DLL, stop IIS and clear all Temporary ASP.Netfiles. E.g.:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NETFiles
  • ALSO: Remember to update your Visual Studio Solution so that itreferences the older version.

Cheers

Pete


So it turns out that Kentico has its own dependency on ICSharpCode.SharpZipZip.dll - and it's expecting to find the older version. I found a similar solution here. By inserting the following block into my web.config file, it seems I have finally banished this error!

<runtime>  <assemblyBinding>    <dependentAssembly>      <assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73"/>      <bindingRedirect oldVersion="0.85.3.365" newVersion="0.85.5.452"/>    </dependentAssembly>  </assemblyBinding></runtime>

What I still don't understand is, why didn't Dependency Tracker show up this dependency?

EDIT: Oh dear, this didn't solve it after all. It seems to happen less frequently now, but after restarting IIS today, one of our testers got the old error message again! :-(


You mention that the first one or two times a user visits the site you get the error.

To fix the problem I suggest you run Process Monitor and see where its looking to find and load the assembly.

-iisreset
-start Process Monitor on the server
-view a couple of pages and reproduce the problem as quickly as possible
-stop the ProcessMonitor trace
-search in the process monitor trace for ICSharpCode.SharpZipLib

If that fails, see what else was the cause:

-save the ProcessMonitor results as CSV
-open the CSV in Excel
-filter all columns
-choose the drop down list of the column with the Access Denied or ...

This should tell you what the problem is with the error Could not load file or assembly