I am trying to install a windows service with installutil in cmd and this is the msg I get:
Exception occurred while initializing the installation: System.BadImageFormatException: Could not load file or assembly 'file:///D:\inst all\DemoWinProject.exe' or one of its dependencies. The module was expected to contain an assembly manifest..
Can you help me out whats the prb ???
I fixed this problem by writing the path where my InstallUtil.exe is and then Write the command InstallUtil and then write the path where my exe file that needs to be install is.
Note : Make another copy of debug folder in another place and install the exe file from that path. This is because anytime you make a built the exe file changes.So to prevent the changes of the installed .exe make a copy of it in another place and install it.
ex.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>installutil c:\Documents\Debug\WindowsService.exe