I am getting below exception when I try to run installer to set up service:
# ./InstallUtil ../../../../Applications/GasPosApp/bin/Wrapper.exe -s ../../../
.
This is often an indication of a mismatch between 32 and 64 bit. For instance if Wrapper.exe
is compiled as x86 and you install it using the 64 bit InstallUtil
the process cannot load the 32 bit Wrapper.exe
assembly and will throw a BadImageFormatException
.
The solution is to use the 32 bit InstallUtil
placed in the Framework
(not Framework64
) subfolder of the .NET folder (e.g. C:\Windows\Microsoft.NET\v4.0.30319\Framework
if you are using .NET 4 or 4.5).