Create a "XXXServiceLibrary" project (dll) that contains the services and no hosting logic. Implement your services and all their logic here.
While you are focusing on the services only, and not yet caring about hosting them, you may use one of the below hosts:
- WCFServiceHost (http://msdn.microsoft.com/en-us/library/bb552363.aspx)
- IIS/WAS (create a web project XXXIISServiceHost, and enter the necessary configuration in the web.config for hosting your services. You may also use .svc files for simplicity)
- A Simple Console App XXXConsoleServieHost, and manually write your self hosting logic. But if your service do not require any special hosting logic, use one of the two first options.
When you're done developing and unit testing your services, then create your XXXWinSvcServiceHost project (Windows Service), and implement your hosting logic in it.
You got it. Separate your service library from its hosting project. And yes, it is very easy and straight forward to move from one host to the other. In most cases, you don't need to repeat the configuration work; just copy it over.