I am facing an exception in C++/CLI while dynamically loading assembly which itself creates an EXE in C++/CLI managed mode using Assembly.Load
. It successfully loads a DLL assembly, but fails to load EXE assembly and generates the following exception:
An unhandled exception of type 'System.IO.FileLoadException' occurred in TestManager.dll
Could not load file or assembly 'testAssembly, Version=1.0.3836.39802, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Attempt to load an unverifiable executable with fixups` (IAT with more than 2 sections or a TLS section.)
Exception from HRESULT: 0x80131019
TestManager.dll itself is a managed dll and loaded into another CLR process in CLI and tries to load EXE assembly as a seperate process, but fails and generates an exception.
This could probably be due to playing with mixed modes.