.NET Core:启动新进程并退出当前

我有一个.NET Core应用程序(带有Avalonia的桌面应用程序),它需要启动另一个进程(很可能本身就是另一个应用程序或另一个类似的应用程序)。

The requirement is similar in nature to this question from almost a decade ago, but the answers posed there haven't worked for me - either they cause the main app to stay open until the second is closed or kills off the second to close the first.

The child process should be able to continue running when tha main application closes. As far as I'm aware, the ProcessStartInfo.UseShellExecute property should allow for this.

//this will be called like LaunchNoOutput("C:\\Apps\\AnotherApp.exe")
public static void LaunchNoOutput(string exec) {
    var process = new Process {
        StartInfo = new ProcessStartInfo {
            FileName = exec,
            UseShellExecute = true,
            CreateNoWindow = true
        }
    };
    process.Start();
}

运行上述代码后,启动的应用程序(即子级)将按预期保持打开状态,但是如果我关闭原始应用程序(即父级),它也会也关闭子级应用程序。

Is there a way to keep the child process running or detach it from the parent, so that calling Environment.Exit(0) on the parent does not cause the child to exit as well?