-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Issue Description
When custom task runs child process, such as here https://github.com/dotnet/arcade/blob/258a37cd6a7884f771d0f991d9f24d29e292abd0/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs#L137-L142 , such processes started from task running at MSBuild server node or worker node will be unattached from stdout/err pipe and outputs from such processes will not make it to target device (console, terminal, file, etc...).
In some circumstances, such process can even fail, like it did in linux on dotnet/aspnetcore#43028
It can break customers whom:
- Have custom tasks which start child process without outputs redirection.
- And, need outputs from such child processes to be redirected to current process outputs.
Steps to Reproduce
- TODO: I will try to create mini repro.
Workaround
a) opt-out from msbuild server (env var DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1 or build argument /nr:false)
b) change custom tasks to execute process with output redirected and capture those outputs
c) use MSBuild Exec task to run other processes and tools - it has b) already implemented