I'm running a .NET 2.0 executable with a .com extension from a command line and receiving the following error:
System.BadImageFormatException : The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)
I'm pretty sure it's trying to load a DLL from the .NET 2.0 Global Assembly Cache.
I only get this error on machines with .net 4.0 / visual studio 2010 installed, so I'm assuming its using the wrong .net framework version to run. Any ideas on how to confirm this assumption?
or is there a way to specify the program to use .net 2 runtime instead of .net 4 to run the .com file?