Pradeep
Pradeep

Reputation: 5500

How to Configure the Windows Service Release Tasks like Install TopShelf Windows Service in VSTS?

I am working on DevOps with VSTS. I created the simple windows service application using VS2015 for that I configured the release definition in VSTS by adding this tasks through this Windows Service Release Tasks.

I configured the Start Windows Services, Install (TopShelf) Windows Service and Stop Windows Services tasks successfully.

Configuration of Install (TopShelf) Windows Service enter image description here

During release the above Stop and Install tasks are run successfully but Start task failed with the following error.

The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: No such services: FirstService

Because the Install(TopShelf) Windows Service task will not be installed an windows service in machine. But it simply succeded.

I have the few questions like

  1. what is the difference between Install(TopShelf) Windows Service and Install and Start Windows Service VSTS release tasks.
  2. If I used the Install(TopShelf) Windows Service task, It works only if you have already existing windows service is running in virtual machine otherwise it will failed. But if I used the Install and Start Windows Service task, It will be installed new windows service in virtual machine. But I am unable to give Displayname and Description of the installed windows service.

Upvotes: 0

Views: 5794

Answers (1)

Eddie Chen - MSFT
Eddie Chen - MSFT

Reputation: 29958

They are two extensions created by 3rd party. So you can search them in the VSTS Marketplace and get the detailed information for them.

For your question:

Install(TopShelf) Windows Service

This is used to install Topshelf service which created with Topshelf framework.

Install and Start Windows Service

This is used to install the general Windows Service via Power-Shell or InstallUtli.

So if you just create a general Windows Service from VS. You should use the second one.

And usually, to set the Display Name and Description for a Windows Service, you need to do it in your code. Please refer to this question for details: What's the best way to set a windows service description in .net.

Upvotes: 3

Related Questions