Suppose I want to create a windows service, but as I want to debug it, (and there may be other reasons...) I want to create an application that can be build as a windows service OR application. How do i do that ?
Can you do that by Building the functionality of your service in a service helper application, say serviceHelper and implement start and stop methods and whatever you need in there ? Can you then create a very very small windows-service who's start and stop, etc you need are implemented by just calling the methods in the serviceHelper you just created ?, and this way debug your service using your serviceHelper ?
Is it true that this works, except for the fact that you should take into account that you cant debug problems with the projectInstaller ? ( serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic) (serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalService)