Your program needs a suitable entry point. Are you writing in C# or VB.NET
If you look at what Visual Studio 2005 gives you when you create a new C# Windows Service application, you'll see some code like this:
static void Main()
{
ServiceBase[] ServicesToRun;
// More than one user Service may run within the same process. To add
// another service to this process, change the following line to
// create a second service object. For example,
//
// ServicesToRun = new ServiceBase[] {new Service1(), new MySecondUserService()};
//
ServicesToRun = new ServiceBase[] { new Service1() };
ServiceBase.Run(ServicesToRun);
}
This is the critical code that enables your application to run correctly as a service. If you look at the equivalent entry point for a Windows Application you'll see it looks quite different.
If you're using VB.NET it's the same problem, only the VB.NET IDE hides it from you, making it harder to diagnose...
Create a new Windows Service project. In Solution Explorer, click the 'Show All Files' button at the top. (It has a picture of some files and folders.) Expand Service1.vb to reveal Service1.Designer.vb. Open that file. Notice that it contains this:
' The main entry point for the process
<MTAThread()> _
<System.Diagnostics.De****NonUserCode()> _
Shared Sub Main()
Dim ServicesToRun() As System.ServiceProcess.ServiceBase
' More than one NT Service may run within the same process. To add
' another service to this process, change the following line to
' create a second service object. For example,
'
' ServicesToRun = New System.ServiceProcess.ServiceBase () {New Service1, New MySecondUserService}
'
ServicesToRun = New System.ServiceProcess.ServiceBase() {New Service1}
System.ServiceProcess.ServiceBase.Run(ServicesToRun)
End Sub
This is the VB.NET equivalent of the C# code shown above.
Now do the same thing in the app you converted from a Windows Application into a Windows Service. Notice that the Service1.Designer.vb file does not contain this code.
That's why your service is not appearing in the Startup Object list - its missing that Sub Main entry point. If you copy that code over into either Service1.vb or Service1.Designer.vb, you should find that your service appears in your Startup Object list.