views:

173

answers:

3

Hello, i was just about to finish up my project and install it as a windows service. I have the installer, etc. - everything i need. When i went to choose Application Type, Windows service does not appear as an option.

Here is the kicker. When I dev in VB.NET, i have that option. The project mentioned above is in c#.

Also, if i try to add a new project, i cannot select windows service as a project type. From within the project i can add a windows service and an installer class.

Any ideas or am i just forgetting something stupid?

A: 

In my copy of Visual Studio 2005, when I create a new project it's not listed directly under the C# project type, but under C#->Windows

Here there should be a project type called "Windows Service" which sounds like what you're looking for.

John Sibly
I can select that as a project type for a new project, but in the application tab of that project, i still cannot select Windows Service as an output type.
schmoopy
+1  A: 

You need an installer class in your project, then you need a Setup project which will incorporate the output of the project's build.

See here: http://msdn.microsoft.com/en-us/library/aa984464(VS.71).aspx for a great walkthrough.

Mike L
Wow, thank you - thats lame tho! I can create the projecet in VB.NET and just select Windows Service as output, thats sux i have to create an installer project just because its c#. Oh well. Thank you for the article/anser :-0)
schmoopy
A: 

I posted here:

What i ended up doing was creating a sep class file that created an instance of the winservice - compiled it as a windows service then used installutil to install the service - works like a champ and i didnt have to create an installer project :-)

schmoopy