[PR #12980] Build a NuGet Package for ConPTY #29325

Open
opened 2026-01-31 09:34:15 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/12980

State: closed
Merged: Yes


This pull request introduces a packaging phase that emits
Microsoft.Windows.Console.ConPTY, a nuget package that contains the
pseudoconsole API as well as the requisite copies of conhost.

  • winconpty learned to load a version of OpenConsole.exe specific to the
    processor architecture on its hosting machine
  • the package, as well as its contents, is signed properly and is nearly
    ready for distribution via nuget.org
  • the API in conpty-static.h has been adjusted to expose
    CreatePseudoConsoleAsUser and stamp out the correct DLL import/export
    annotations.
  • getting .NET to play right was somewhat challenging, but I tested this
    against .NET 6.0 and it seemed to work properly; it shipped conpty.dll
    in the right places, and it shipped OpenConsole.exe next to the
    published application.

In the future, we could provide an interop assembly for C# consumers;
that is, unfortunately, out of scope today.

Closes #3577
Closes #3568
Obsoletes #1130

**Original Pull Request:** https://github.com/microsoft/terminal/pull/12980 **State:** closed **Merged:** Yes --- This pull request introduces a packaging phase that emits Microsoft.Windows.Console.ConPTY, a nuget package that contains the pseudoconsole API as well as the requisite copies of conhost. * winconpty learned to load a version of OpenConsole.exe specific to the processor architecture on its hosting machine * the package, as well as its contents, is signed properly and is nearly ready for distribution via nuget.org * the API in conpty-static.h has been adjusted to expose CreatePseudoConsoleAsUser and stamp out the correct DLL import/export annotations. * getting .NET to play right was somewhat challenging, but I tested this against .NET 6.0 and it seemed to work properly; it shipped conpty.dll in the right places, and it shipped OpenConsole.exe next to the published application. In the future, we could provide an interop assembly for C# consumers; that is, unfortunately, out of scope today. Closes #3577 Closes #3568 Obsoletes #1130
claunia added the pull-request label 2026-01-31 09:34:15 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29325