Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
BadImageFormatException - The module was expected to contain an assembly manifest
posted

Hello,

We've been using Infragistics WinForms controls for many years and there's been one issue we haven't been able to solve after many version upgrades.  When one of our WinForms applications is running and the user's PC locks up (unrelated to our application) and needs to be powered off, after the system is rebooted there is often an Infragistics DLL that has the first section zeroed out.  In other words, the DLL file itself has had the first initial bytes replaced with all zeros.  When the user then attempts to start the application they get an error similar to the following:

System.BadImageFormatException: Could not load file or assembly 'Infragistics4.Win.UltraWinStatusBar.v18.2, Version=18.2.20182.175, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' or one of its dependencies. The module was expected to contain an assembly manifest.
File name: 'Infragistics4.Win.UltraWinStatusBar.v18.2, Version=18.2.20182.175, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb'

The affected DLL is not always UltraWinStatusBar; it can be UltraWinGrid, UltraWinToolbars, or the Win DLL (Infragistics4.Win.v18.2).  The size and timestamp of the file are unchanged.  I'm guessing the part of the file that gets zeroed out is the part that contains the assembly manifest.

The only solution is to re-copy the DLL from another source.  Any suggestions you can offer would be greatly appreciated.