0

In my release definition at VSO I have a Powershell script task (inline) to start a console application that hosts a microservice, but i cannot see any output of the window because its hidden.

Even if I connect to the agent's account via Remote Desktop on the server where the application should run, and start the release process again, it only starts visible in task manager.

Is there a way to start that console application in foreground so I can see the output?

That is my Powerhell script in the release-task

Start-Process -FilePath C:\microservicedepot\MicroserviceHostingClient.exe -Verb open -WindowStyle Maximized -argument "dev" 

Thanks ;)

  • Did you check the output after the release is finished? VSTS will close all the process launched during the build/release when it is finished. – Eddie Chen - MSFT Sep 06 '18 at 06:20

3 Answers3

0

You need to start the application in Command Line task:

enter image description here

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
0

Use the Command Line Script task to call the application and redirect the output with >.

C:\microservicedepot\MicroserviceHostingClient.exe "dev" > C:\logs\MicroserviceHostingClient.log
renklus
  • 776
  • 6
  • 17
0

Just call that application through PowerShell directly, then check the output in build/release log:

&"C:\microservicedepot\MicroserviceHostingClient.exe" "dev"
starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53