Error while trying to run project:The module was expected to contain an assembly manifest

The module was expected to contain an assembly manifest

It is a low-level assembly loading problem. The CLR has located a file with the right name but when it tries to load the assembly, it finds out that the file doesn’t contain a proper manifest. A .NET assembly must contain a manifest, it contains metadata that describes the assembly, listing the types in the assembly, etc.

If you have no clue what EXE or DLL might be the troublemaker then you can use the Fuslogvw.exe utility:

  1. Start it from the “Visual Studio Command Prompt”.
  2. Click the “Settings” button and click the “Log binding failures to disk” radio button.
  3. Switch back to VS and start the program and wait for the exception to occur.
  4. Back to Fuslogvw, click the “Refresh” button and double-click the added entry.
  5. It shows you the file it found.

Several possibilities, a common one these days is to trying to load a .NET 4 assembly with an EXE that asked for CLR version 2. That requires an app.exe.config file that forces CLR 4 to be used.

Leave a Comment