I am getting below exception when I try to run installer to set up service:
# ./InstallUtil ../../../../Applications/GasPosApp/bin/Wrapper.exe -s ../../../
.
I agree with all here! This error come, if you are trying to load your application or a one of the refreanced assemblies in an invalid operating system format.
http://msdn.microsoft.com/en-us/library/system.badimageformatexception(v=vs.80).aspx
Microsoft has created useful tool called CorFlags which can be used to show or set the targeted platform of an managed assembly.
C:\Program Files\Microsoft.NET\SDK\v2.0\Bin\CorFlags.exe
Syntax:
CorFlags filename
**anycpu**
Version : v4.0.30319
CLR Header: 2.5
PE : PE32
CorFlags : 1
ILONLY : 1
32BIT : 0
Signed : 0
**x86**
Version : v4.0.30319
CLR Header: 2.5
PE : PE32
CorFlags : 3
ILONLY : 1
32BIT : 1
Signed : 0
**x64**
Version : v4.0.30319
CLR Header: 2.5
PE : PE32+
CorFlags : 1
ILONLY : 1
32BIT : 0
Signed : 0