Creating a Windows Service

In VS .NET 2003, you could create a Windows Service using Visual Basic. This was a great feature and I used it several times. I went to try this in VS 2005 and it doesn't seem to be an option.

Will this feature be included in the final version of VS 2005 or am I just not finding it in B2?

Thanks.

[302 byte] By [Johngeh] at [2008-2-8]
# 1

You can still create a Windows Service, in the New Project dialog you need to make sure that the Visual Basic node is expanded and you have selected the Windows node. It's hiding in there.

DavidM.Kean at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2

I must be missing something then. When I create a new project I see the nodes that you are referring to. I select "Visual Basic" and then "Windows". I see the following Visual Studio installed templates:

Windows Application
Windows Control Library
Console Application
Class Library
Wen Control Library
Empty Project

I am running VS 2005 version 8.0.50215.44 (beta2.050215-4400).

Where should I look for the Windows Service template?

Thanks.

Johngeh at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3

I'm using the same build and I can see everything the same as you, but I have one extra and that's the Windows Service.

Are you using VB Express or the full Visual Studio? If you are using Visual Studio, then it may be bug. Report it on the Microsoft Feedback Center.

In the mean time, you can easily create a service, by just using an Empty Project and adding a class that inherits from System.ServiceProcess.ServiceBase making sure that you reference System.ServiceProcess.dll.

The templates are just that, templates, there's not any magic to them, and you can easily create one from another.

DavidM.Kean at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4
Thanks David.

I was using VS Professional. I upgraded to VS Team Server and the Windows Service template appeared. It looks like the templates that you have access to is dependent upon the version that you install.

John

Johngeh at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 5
That is the case, but I would be very surprised if VS Profesional didn't contain the Windows Service Template.

Well it did in VS 2003 anyway.

DavidM.Kean at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...