The strange case of System.BadImageFormatException: Could not load file or assembly ‘Microsoft.mshtml’

July 23, 2008

A couple of days ago another customer of my MZ-Tools add-in reported this exception: “System.BadImageFormatException: Could not load file or assembly ‘Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The module was expected to contain an assembly manifest.” The GAC (C:\Windows\Assembly folder) showed the file with the correct version and public key token, so […]