I had faced this issue before and I was able to fix the above issue with the help of Installing the Service Manually.
To install the service manually please follow below procedure:
To be able to install or uninstall your windows service manually which you had created using the .NET Framework you should use the utility InstallUtil.exe. This very useful tool can be found on below path you should use the appropriate framework version number.
To install use below command:
To uninstall use below command:
installutil /u yourproject.exe
To install the service programmatically please follow below procedure:
You can also install the service programmatically by using the C# with the help of following class ServiceInstaller (c-sharpcorner).
Hope above procedure helps you.