Question: I'm trying to run a cypress test in an azure pipeline. In order to do that I need to run 'dotnet run' before I run the test. I have a pipeline task that successfully runs the 'dotnet run' command but because it never exits, the pipeline never gets to the next task. Is there a way using YAML to make the pipeline job go to the next step while keeping the 'dotnet run' command running?

If that isn't possible is there a way to run 'dotnet run' in the background while running a cypress test in an Azure pipeline?

Here's part of my YAML code:

```
- task: DotNetCoreCLI@2
  displayName: 'dotnet run'
  inputs:
        command: run
        projects: Api/Api.csproj
        arguments: '--configuration Release --verbosity normal'

- script: 'npx cypress verify' // pipeline job never gets to this step
    displayName: 'Verify Cypress Can Run'
    failOnStderr: true

```

Answer: 
I came up with a solution. I put 'dotnet run' in a powershell script that runs as a background process.

The powershell script:

```
Start-Process powershell -ArgumentList "-NoProfile", "-NonInteractive", "-NoExit", {
    dotnet run
}

```

Then I run the powershell script in a powershell build step:

```
- task: PowerShell@2
    inputs:
      targetType: 'filePath' # Optional. Options: filePath, inline
      filePath: $(Build.SourcesDirectory)\Api\dotnetrun.ps1
      errorActionPreference: 'stop'
      failOnStderr: false # Optional
      workingDirectory: ./Api
      displayName: 'Run dotnet run as background process'

```

The build step runs and goes to the next step as desired.
You can also run this with a linux agent / using the bash task:
`dotnet run &`

Source: <https://linuxize.com/post/how-to-run-linux-commands-in-background/>