In DevOps I have a Release pipeline with 3 stages (Init Environment, Test and Clean). In the first stage I use a simple PowerShell Task which starts an application on the same device where my local agent is running. This application has to run until the pipeline finishes, because I need to access it from the other stages too. But it automatically closes when the first stage finishes. I can't prevent it from closing and I don't understand why it closes. When I call this command on a local PowerShell the started application keeps running, even if I close the PowerShell window?!
Here is my task:
The sleep command is just to be sure that the application really starts. Without sleep it is too fast and you don't see the application startup.
So my question is: How can I keep the application running until the pipeline is done? Or how can I prevent it from closing automatically, after the first stage finished? Do I miss a pipeline setting or perhaps a setting in the agent?