Skip to content

Surface dotnet-getdocument output to Terminal Logger#66421

Open
KitKeen wants to merge 1 commit intodotnet:mainfrom
KitKeen:fix/apidescription-server-terminal-logger
Open

Surface dotnet-getdocument output to Terminal Logger#66421
KitKeen wants to merge 1 commit intodotnet:mainfrom
KitKeen:fix/apidescription-server-terminal-logger

Conversation

@KitKeen
Copy link
Copy Markdown

@KitKeen KitKeen commented Apr 22, 2026

Summary

Fixes #62273.

The Microsoft.Extensions.ApiDescription.Server MSBuild target invokes
dotnet-getdocument via the <Exec> task. By default <Exec> captures
stdout/stderr at MessageImportance="Low", so MSBuild Terminal Logger
(default in .NET 8+) hides the messages emitted by the tool — including
Generating document named '{name}' and Writing document '{name}' to '{path}'.

Users currently have to pass --tl:off or -tlp:v=d to see them, which
is poorly discoverable.

Change

Add StandardOutputImportance="High" and StandardErrorImportance="High"
to the <Exec> invocation in
src/Tools/Extensions.ApiDescription.Server/src/build/Microsoft.Extensions.ApiDescription.Server.targets.

These attributes have been part of the MSBuild Exec task for a long time
(see also dotnet/msbuild#9810 for the broader Terminal Logger surfacing
work), so there is no SDK-version risk.

Behavior

  • Before: invocation logs from dotnet-getdocument are silent under
    Terminal Logger at default verbosity.
  • After: invocation logs are surfaced through the standard MSBuild
    high-importance pipeline and shown in Terminal Logger like any other
    high-priority build message.

Risk

Minimal. The change only raises the importance of messages already emitted
by the tool. No new messages, no behavior change at any verbosity level
where the messages were previously visible.

@github-actions github-actions Bot added the area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI label Apr 22, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Apr 22, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Thanks for your PR, @KitKeen. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

Add StandardOutputImportance="High" and StandardErrorImportance="High"
to the Exec task invoking dotnet-getdocument so its messages
("Generating document named 'v1'", etc.) are visible at default
verbosity when MSBuild Terminal Logger is enabled (default in .NET 8+).

Fixes dotnet#62273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Microsoft.Extensions.ApiDescription.Server - Surface Invocation with new TerminalLogger

1 participant