views:

261

answers:

2

I own a copy of Visual Studio 2008 Standard Edition, and I'd like to create a Windows Service. However, I don't have a Windows Service project template. According to this chart, Standard Edition should be able to create Windows Services. I tried running devenv.exe /InstallVSTemplates, but I don't seem to have any of the Windows Service templates (which is probably why the devenv command didn't work).

Does anyone know how I can get the templates?

+1  A: 

You don't need the templates. Just create a class that inherits from ServiceBase and in your Main() method call ServiceBase.Run().

You can use a console project and use command line options or Debugger.IsAttached to decide whether to run as a service or not.

Sam
A: 

It seems that not including the template in the Standard edition was an oversight on Microsoft's part. Check out this Microsoft forum thread where someone was kind enough to post the template that you then simply install with devenv /installvstemplates

Epaga