Issue 497 · Week of Jul 14, 2026
Feed Jobs Search Platform About Donate
← Back to feed / //dotnet

.NET 11 Preview 5: new Process APIs eliminate deadlocks when reading process output

Read full article Discuss
In the latest part of his .NET 11 preview series, Andrew Lock walks through the Process API improvements in Preview 5. The old approach with `StandardOutput.ReadToEnd()` and `StandardError.ReadToEnd()` could deadlock when reading a child process's output. .NET 11 adds safe methods that read stdout and stderr simultaneously: `ReadAllText()` / `ReadAllTextAsync()`, a line-by-line `ReadAllLines()` with `await foreach` support for real-time processing, `ReadAllBytes()` for raw data, and one-call `RunAndCaptureText()` methods that combine startup, output capture, and waiting for exit. The changes remove common pitfalls, cut boilerplate, and make the APIs more discoverable through modern C# constructs.