Skip to content

feat: record DocFX build version in output manifest - #11162

Merged
vicancy merged 1 commit into
dotnet:mainfrom
vicancy:lianwei-microsoft-layout-regression-investigation
Sep 24, 2026
Merged

vicancy merged 1 commit into
dotnet:mainfrom
vicancy:lianwei-microsoft-layout-regression-investigation

Conversation

@vicancy

@vicancy vicancy commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Record the build engine's full informational version in the top-level docfx_version property of manifest.json, including prerelease and commit information when present. Read the version from the executing Docfx.Build assembly rather than the host application or Docfx.Plugins, so both CLI and library builds identify the engine that produced the output.

The stamp is applied once after manifest merging and post-processing. Templates, page metadata, and generated HTML are unchanged. Both JSON serializers use the same property name, and older manifests without it remain readable.

This follows the earlier suggestion to stamp the manifest instead of every HTML file. Motivated by comparing builds while investigating #11153; this adds diagnostics and does not fix or close the layout issue.

Validation

  • All 9 DocumentBuilderTest cases pass on .NET 8 and .NET 10, including new coverage for empty, single-document, and grouped builds, both JSON serializers, older manifests, and unchanged HTML/raw models.
  • A real CLI site build produces docfx_version exactly matching that CLI's --version, including the commit suffix, without stamping HTML.
  • Changed-file formatting and git diff --check pass.

Local validation used an isolated checkout at da9bf7e0f with the identical changed files. The only differences from this PR's base are the subsequent Markdig 1.4.0 and Jint 4.16.3 bumps, whose packages are not yet available in the approved local feed. This PR does not change dependencies; validation against those newer versions remains for CI.

Stamp the complete build-engine informational version in manifest.json for troubleshooting without changing generated HTML or page metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@vicancy
vicancy merged commit e5dcdd7 into dotnet:main Sep 24, 2026
9 checks passed
This was referenced Sep 25, 2026
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