I'm looking to convert a small .NET console application into a Windows Service. I'd like to build two versions, one using .NET 2.0 and another with .NET 3.5 .
Are there radically different approaches that need to be taken, or will the 2.0 version be roughly equivalent to the 3.5 version? Where's a good source of information (i.e. a web-based guide) that can walk me through the steps of setting up the service?
Thanks! P.A.
Actually, .NET 3.5 does change the C# code a little. For example, you can use the var keyword, and you can use the hidden private variables for properties. It is still based on CLR 2.0.
There is a pretty good article at msdn that talks about windows services and walks you through building one.
To supplement Rick's answer, I'd suggest the MSDN Walkthrough
It is incredibly verbose and touches on event logging as well as an installer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With