From daba775ed22a218d06e3dd2e5da5f08672991926 Mon Sep 17 00:00:00 2001 From: binary number <57023457+binary-number@users.noreply.github.com> Date: Wed, 5 Jun 2024 18:01:07 +0900 Subject: [PATCH] fix: the window of the process launched by ProcessWrapper.StartWithEvent does not open on .NET .8.0. .NET 8 breaking change: ProcessStartInfo.WindowsStyle honored when UseShellExecute is false https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/8.0/processstartinfo-windowstyle --- src/ProcessBuilder/ProcessWrapper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ProcessBuilder/ProcessWrapper.cs b/src/ProcessBuilder/ProcessWrapper.cs index 8b532bd..0963b6e 100644 --- a/src/ProcessBuilder/ProcessWrapper.cs +++ b/src/ProcessBuilder/ProcessWrapper.cs @@ -16,8 +16,8 @@ public ProcessWrapper(Process process) public void StartWithEvents() { - Process.StartInfo.CreateNoWindow = true; - Process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; + Process.StartInfo.CreateNoWindow = false; + Process.StartInfo.WindowStyle = ProcessWindowStyle.Normal; Process.StartInfo.UseShellExecute = false; Process.StartInfo.RedirectStandardError = true; Process.StartInfo.RedirectStandardOutput = true;