Link the platform compatibility analyzer article from OS platform API reference pages - #12993
Open
jeffhandley wants to merge 1 commit into
Open
Link the platform compatibility analyzer article from OS platform API reference pages#12993jeffhandley wants to merge 1 commit into
jeffhandley wants to merge 1 commit into
Conversation
… docs Adds a See also entry pointing to /dotnet/standard/analyzers/platform-compat-analyzer on the type-level docs for the OS platform attributes and System.OperatingSystem. That article is the conceptual documentation for these APIs, including the platform name and version string formats, but none of the reference pages linked to it. Follow-up to a comment on dotnet/runtime#125181. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a See also (ECMA XML <related>) link from OS platform API reference pages to the Platform compatibility analyzer conceptual article, so readers can easily discover the authoritative guidance on platform name/version formats, CA1416 behavior, and platform guard patterns.
Changes:
- Linked
/dotnet/standard/analyzers/platform-compat-analyzerfromSystem.OperatingSystem. - Linked the same conceptual article from the OS platform attribute and guard attribute reference pages.
- Kept the change localized to a single
<related>entry per type-level<Docs>section.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| xml/System/OperatingSystem.xml | Adds a <related> article link to the platform compatibility analyzer. |
| xml/System.Runtime.Versioning/OSPlatformAttribute.xml | Adds a <related> article link to the platform compatibility analyzer. |
| xml/System.Runtime.Versioning/TargetPlatformAttribute.xml | Adds a <related> article link to the platform compatibility analyzer. |
| xml/System.Runtime.Versioning/SupportedOSPlatformAttribute.xml | Adds a <related> article link to the platform compatibility analyzer. |
| xml/System.Runtime.Versioning/UnsupportedOSPlatformAttribute.xml | Adds a <related> article link to the platform compatibility analyzer. |
| xml/System.Runtime.Versioning/ObsoletedOSPlatformAttribute.xml | Adds a <related> article link to the platform compatibility analyzer. |
| xml/System.Runtime.Versioning/SupportedOSPlatformGuardAttribute.xml | Adds a <related> article link to the platform compatibility analyzer. |
| xml/System.Runtime.Versioning/UnsupportedOSPlatformGuardAttribute.xml | Adds a <related> article link to the platform compatibility analyzer. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
gewarren
approved these changes
Aug 17, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Adds a See also link to the Platform compatibility analyzer conceptual article on the API reference pages for the OS platform attributes and
System.OperatingSystem.That article is the conceptual documentation for these APIs — it covers the platform name and version string formats, how CA1416 interprets the attributes, and which patterns count as platform guards — but none of the reference pages linked out to it.
Files touched (one
<related>line each, in the type-level<Docs>):System.Runtime.Versioning.OSPlatformAttributeSystem.Runtime.Versioning.TargetPlatformAttributeSystem.Runtime.Versioning.SupportedOSPlatformAttributeSystem.Runtime.Versioning.UnsupportedOSPlatformAttributeSystem.Runtime.Versioning.ObsoletedOSPlatformAttributeSystem.Runtime.Versioning.SupportedOSPlatformGuardAttributeSystem.Runtime.Versioning.UnsupportedOSPlatformGuardAttributeSystem.OperatingSystemSystem.Runtime.InteropServices.OSPlatformis intentionally excluded: the article doesn't mention it, andRuntimeInformation.IsOSPlatformisn't recognized by CA1416 as a platform guard, so the link would misdirect readers.Follows up on a comment in dotnet/runtime#125181. These types set
UseCompilerGeneratedDocXmlFile=false, so dotnet-api-docs is the source of truth for their docs and this is the correct repo for the change.Internal previews