Skip to content

lazy initialize NuGet's instance of AnsiConsole#4139

Merged
zivkan merged 2 commits intodotnet:release/10.0.2xxfrom
zivkan:nuget-ansiconsole-lazy-initialize
Jan 12, 2026
Merged

lazy initialize NuGet's instance of AnsiConsole#4139
zivkan merged 2 commits intodotnet:release/10.0.2xxfrom
zivkan:nuget-ansiconsole-lazy-initialize

Conversation

@zivkan
Copy link
Member

@zivkan zivkan commented Jan 9, 2026

fixes: dotnet/sdk#52278

Apparently using Spectre.Console's AnsiConsole.Console sends VT control codes on initialize, not first API usage, and this is messing up some of the dotnet CLI's C++ output, like dotnet --info

So, NuGet should not call AnsiConsole.Console until it actually needs it. Lazy should do it.

@dotnet-policy-service dotnet-policy-service bot requested a review from a team January 9, 2026 21:17
@aortiz-msft
Copy link

Could we please link this to an issue?

@MiYanni
Copy link
Member

MiYanni commented Jan 9, 2026

Could we please link this to an issue?

dotnet/sdk#52278

@zivkan zivkan marked this pull request as ready for review January 10, 2026 00:05
@zivkan
Copy link
Member Author

zivkan commented Jan 10, 2026

I did a very basic manual test, and it looks to me like it fixed the issue.

@zivkan zivkan merged commit e85eced into dotnet:release/10.0.2xx Jan 12, 2026
7 checks passed
@zivkan
Copy link
Member Author

zivkan commented Jan 13, 2026

/backport to release/10.0.1xx

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx (link to workflow run)

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.

3 participants