So, you get the old BadImageFormat error when installing your service. If you aren’t writing C++ extensions, then this is probably because you forgot to use the right version of InstallUtil for your target platform.
i.e. x86 build using x64 InstallUtil or vice versa.
Easiest fix? Just build for Any CPU. Then you really don’t have to think about it too hard.