System.BadImageFormatException on WindowService Deployment

Problem: After converting the window service project to .Net 4.0 Framework, you received an error while deploying with InstallUtil Utility or SetUp Project file. Error Example:

Solution: If you look closer to InstallUtil output, it displays “Microsoft (R) .NET Framework Installation