Skip to content

Add net11.0 target and adopt .NET 11 Process API improvements - #27

Open
Mpdreamz wants to merge 1 commit into
masterfrom
fix/format
Open

Mpdreamz wants to merge 1 commit into
masterfrom
fix/format

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Target net11.0 alongside the existing TFMs (pinned via global.json to the preview SDK, CI updated to install it).
  • Adopt a few of the .NET 11 Process API improvements, gated behind NET11_0_OR_GREATER and no-ops elsewhere:
    • SendControlC delivers SIGINT on Unix via SafeProcessHandle.Signal instead of shelling out to kill.
    • New KillOnParentExit and InheritedHandles options on StartArguments/ExecArguments, wired into ProcessStartInfo.
    • EventBasedObservableProcess reads through Process.ReadAllLinesAsync.
  • Simplify BufferedObservableProcess's stream reading on netstandard2.1/net8.0/net10.0/net11.0, dropping the hand-rolled CancellableStreamReader now that StreamReader.ReadAsync has a native cancellable overload on those TFMs (kept for netstandard2.0/net461).
  • Publish Proc.Tests.Binary as a NativeAOT executable and invoke it directly in tests instead of dotnet <dll>, removing dotnet-host/JIT startup variance from process-lifecycle tests, and add coverage for the new behaviors (KillOnParentExit, Unix SendControlC).

Test plan

  • ./build.sh build — full solution builds cleanly across all TFMs.
  • ./build.sh test — full suite passes on both net10.0 (48 passed) and net11.0 (50 passed), with expected Windows-only/KillOnParentExit-on-macOS skips.
  • CI green on GitHub Actions (Ubuntu), including the new NativeAOT toolchain install step.

Made with Cursor

Proc now multi-targets net11.0 and picks up a few of the Process API
improvements from that release, all gated behind NET11_0_OR_GREATER and
no-ops elsewhere:

- SendControlC delivers SIGINT on Unix via SafeProcessHandle.Signal
  instead of shelling out to `kill`.
- New KillOnParentExit and InheritedHandles options on
  StartArguments/ExecArguments, wired into ProcessStartInfo.
- EventBasedObservableProcess reads through Process.ReadAllLinesAsync.

Also simplifies BufferedObservableProcess's stream reading on
netstandard2.1/net8.0/net10.0/net11.0, dropping the hand-rolled
CancellableStreamReader now that StreamReader.ReadAsync has a native
cancellable overload on those TFMs (the class is kept for
netstandard2.0/net461).

Proc.Tests.Binary is now published as a NativeAOT executable and
invoked directly in tests instead of via `dotnet <dll>`, removing
dotnet-host/JIT startup variance from process-lifecycle tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant