Repository navigation
Fix Windows mdoc framework-root path - #12808
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a3ce160e-e16a-4c88-b777-9fd23a3caa0a
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The fix was validated successfully; only a minor documentation nit remains.
Pull request overview
This pull request fixes Windows mdoc framework-root path handling during Android documentation generation.
Changes:
- Uses
Path.DirectorySeparatorChar. - Appends
.to preserve valid quoted Windows paths.
File summaries
| File | Summary |
|---|---|
src/Mono.Android/Mono.Android.targets |
Corrects framework-root and mdoc path construction. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a3ce160e-e16a-4c88-b777-9fd23a3caa0a
rolfbjarne
approved these changes
Sep 16, 2026
simonrozsival
approved these changes
Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
System.IO.Path.DirectorySeparatorCharmdoc updatepath valid on Windows by addressing the same directory asdocs-gen-temp\.Root cause
_RunMdocpassed$(BaseIntermediateOutputPath)docs-gen-temp/tomdoc.exe fx-bootstrap. On Windows, mdoc enumerates framework child directories with backslashes while retaining the root's trailing/. Its substring calculation then drops the first character of the framework moniker (net-android-*becomeset-android-*) and fails with a missing-path error.Independent Android 37.1 and Android 37.2 documentation-generation runs reproduced the same failure. Using a native trailing backslash fixes
fx-bootstrap. The full target also requires avoiding a quoted argument that ends immediately in\, somdoc updatereceives the equivalentdocs-gen-temp\.path.Base:
origin/mainat261d2ce4894cb33942179f113f723eb6ec22f011.Validation
.\dotnet-local.cmd build src\Mono.Android\Mono.Android.csproj -c Debug -p:AndroidApiLevel=37.2 -p:AndroidPlatformId=37.2 -p:AndroidFrameworkVersion=v17.2 -p:IsUnstableVersion=false -bl:bin\BuildDebug\mdoc-framework-37.2-build.binlog -nodeReuse:false.\dotnet-local.cmd msbuild src\Mono.Android\Mono.Android.csproj -t:_RunMdoc -p:Configuration=Debug -p:TargetFramework=net11.0 -p:DocsApiLevel=37.2 -p:DocsPlatformId=37.2 -p:AndroidApiLevel=37.2 -p:AndroidPlatformId=37.2 -p:AndroidFrameworkVersion=v17.2 -p:IsUnstableVersion=false -bl:bin\BuildDebug\mdoc-run-37.2-fixed.binlog -nodeReuse:false -v:normalfx-bootstrapexited successfully with-fx obj\docs-gen-temp\src\Mono.Android\obj\docs-gen-temp\frameworks.xmlwas generatedmdoc updateexited successfully with-fx "obj\docs-gen-temp\."binlogtoolfound nodocs-gen-temp\et-android-, missing-path, illegal-path, orMSB3073entriesMono.Android.targetsas XML and rangit diff --check/through the documented platform contract ofPath.DirectorySeparatorChar; no Unix runtime validation was run locally