It seems that if my build step spawns a child process, that process cannot survive the end of the build - it is killed.
But I have a scenario where a child process is triggered in order to complete offline certain operations that the build should not wait for their completion (reporting metrics to Azure AppInsights).
This procedure worked fine in XAML builds, but now that we migrated to vNext it is broken, because the child process is killed when the build ends.
What can be done about it?
The easiest way is to schedule a task using the task scheduler.
Example using
Microsoft.Win32.TaskScheduler
NuGet package: