none
Windows Services in VS Community?

    Question

  • Years ago I write a FOSS library in VS 2005 Pro.  Now I want to revive it.  Please excuse my rustiness.

    The core part is a Windows Service and, if I'm not mistaken, the class ServiceInstaller has changed.

    So, the thought was to create a new service project (then include my old libraries).  I tried to follow:

    https://msdn.microsoft.com/en-us/library/zt39148a(v=vs.110).aspx

    But it seems that a VS Community licence will not allow me to create a new Windows Service project.  Is that correct?

    Alternatively, is there now a better project type that would allow me to create the service for multiple platforms?  (It's actually a daemon listening on a TCP port.)

    Monday, August 01, 2016 10:49 AM

Answers

  • Hi thonellp,

    Thanks for your post.

    >>But it seems that a VS Community licence will not allow me to create a new Windows Service project.  Is that correct?

    VS 2015 Community support to create the Windows Service Project. You can create it in Project->Classic Desktop, please see the screenshot below:

    Best Regards,

    Lake Xiao

    • Proposed as answer by lake XiaoModerator Thursday, August 04, 2016 6:32 AM
    • Marked as answer by thonellp Friday, August 05, 2016 8:53 AM
    Tuesday, August 02, 2016 2:49 AM
    Moderator

All replies

  • Hi,

    the Windows Service Project is not available in the Express Editions. But if you have the Community Edition installed, then it should be available.

    But even if you do not have such a template: You could create a Windows Forms application, remove the Form and the reference to Windows.Forms.dll. Then you clean the Main() method and put the default stuff in there. References to System.Conifguration.Install and System.ServiceProcess should be added.

    Afterwards you can create a class that derives from ServiceBase that overrides the required methods.

    With kind regards,

    Konrad

    Monday, August 01, 2016 11:06 AM
    Moderator
  • Hi thonellp,

    Thanks for your post.

    >>But it seems that a VS Community licence will not allow me to create a new Windows Service project.  Is that correct?

    VS 2015 Community support to create the Windows Service Project. You can create it in Project->Classic Desktop, please see the screenshot below:

    Best Regards,

    Lake Xiao

    • Proposed as answer by lake XiaoModerator Thursday, August 04, 2016 6:32 AM
    • Marked as answer by thonellp Friday, August 05, 2016 8:53 AM
    Tuesday, August 02, 2016 2:49 AM
    Moderator
  • Thank you!  =)
    Friday, August 05, 2016 8:54 AM