Several years ago I developed a windows service. The current version uses VS2010, and the project has a service installer attached. All has been working, and the last publish I performed was at the beginning of 2013 (around a year ago).
I have made significant changes to the project and attempted a publish, however the resulting 'setup.exe' file seems to not be a service installer, as when run it does not register the service and errors with the following message:
'Cannot start service from the command line or a debugger. A Windows Service must first be installed (using installutl.exe) and then started with the ServerExplorer, Windows Services Administrative tool or the NET START command.'
Now, before you go here's a nice easy question (well I hope it is something silly), I have followed the below links to the 'T', the installer is setup as a service, and the ServiceName matches between the program class and the installer.
http://msdn.microsoft.com/en-us/library/ddhy0byf(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/zt39148a%28v=vs.100%29.aspx
Additionally I have tried the following:
- Loaded the project in VS2012 - Still the same error
- Created a new blank service following the above steps to add the installer. Again this has caused the same error, so the project can't be at faught.
Has anyone ideas what the problem could be, or properties/settings to check? I remember when I used VS2008, the installer was setup as a separate project. I could go down that route, but would really like to find out what is going wrong using this method.