jabbera / my-vsts-tasks

20 stars 18 forks source link

Is not recognized as the name of a cmdlet #52

Closed ravirambles closed 3 years ago

ravirambles commented 3 years ago

I have configured the release pipeline in this order

1.Stop Service 2.Copy Files 3.Install TopShelf Service 4.Start Service

Target is Deployment Group is checked when available.

Pipeline runs without issues until the Install TopShelf Service step and fails with the below error.

[error]The term 'C:\Services\WSTopshelf.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I have entered the below configuration.

image

ravirambles commented 3 years ago

Adding full error log

2021-04-09T19:15:57.8711053Z ##[section]Starting: Install a Topshelf Service: CRMService 2021-04-09T19:15:57.9101086Z ============================================================================== 2021-04-09T19:15:57.9101166Z Task : Install Topshelf Service 2021-04-09T19:15:57.9101229Z Description : Installs a TopShelf service using the standard command line options for Topshelf 4.0. 2021-04-09T19:15:57.9101260Z Version : 8.0.0 2021-04-09T19:15:57.9101302Z Author : Michael Barry 2021-04-09T19:15:57.9101329Z Help : More Information 2021-04-09T19:15:57.9101357Z ============================================================================== 2021-04-09T19:15:59.6741960Z Installing TopShelf service: C:\Services\WSTopshelf.exe with instanceName: . 2021-04-09T19:15:59.7312022Z CMD: $env:DT_DISABLEINITIALLOGGING='true' 2021-04-09T19:15:59.7312412Z $env:DT_LOGLEVELCON='NONE' 2021-04-09T19:15:59.7312601Z Stop-Process -name mmc,taskmgr -Force -ErrorAction SilentlyContinue 2021-04-09T19:15:59.7312964Z & "C:\Services\WSTopshelf.exe" install --localsystem -servicename "CrmService" -displayname "CrmService" -description "CrmService" --delayed 2021-04-09T19:15:59.7313112Z 2021-04-09T19:15:59.9517187Z ##[error]The term 'C:\Services\WSTopshelf.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 2021-04-09T19:16:00.0301334Z ##[section]Finishing: Install a Topshelf Service: CRMService

ravirambles commented 3 years ago

made a mistake in configuring the build task, was able to get it working