I am trying to install a Windows service using InstallUtil.exe and am getting the error message
System.BadImageFormatException: Could not load file or assembly '
{xxx.exe}
' or one of its dependencies. An attempt was made to load a program with an incorrect format.
What gives?
EDIT: (Not by OP) Full message extracted from dup getting way more hits [for googleability]:
See Question&Answers more detail:osC:WindowsMicrosoft.NETFramework64v4.0.30319>InstallUtil.exe C:xxx.exe Microsoft (R) .NET Framework Installation utility Version 4.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved.
Exception occurred while initializing the installation: System.BadImageFormatException: Could not load file or assembly 'file:///C:xxx.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format..