Skip to content

Commit

Permalink
fix: the window of the process launched by ProcessWrapper.StartWithEv…
Browse files Browse the repository at this point in the history
…ent 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
  • Loading branch information
actbit authored and AlphaBs committed Jun 7, 2024
1 parent 4649c00 commit daba775
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ProcessBuilder/ProcessWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit daba775

Please sign in to comment.