I am experiencing an issue that looks very similar to this: What does BadImageFormatException 0x80131124 (Index not found) mean?
This issue only occurs when we run the tests in console (using vstest.console.exe). All our binaries are build on x86 platform. MyCustomModule is a third-party library that is in GAC MSIL, it references a few 32-bit native code libraries. Tests pass with flying colors when run in Visual Studio Test Explorer. Fusion log says MyCustomModule is loaded successfully by vstest.console.exe, even though the tests say otherwise.
System.BadImageFormatException: Could not load file or assembly 'MyCustomModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=53d06f3c4ff12345' or one of its dependencies. Index not found. (Exception from HRESULT: 0x80131124)
Any ideas what else I could try?
User contributions licensed under CC BY-SA 3.0