Repository navigation
Description
Copilot instructions for backporting docs to /// in dotnet/runtime:
XML Documentation Backport Process:
-
Source: Extract XML from https://github.com/dotnet/dotnet-api-docs/blob/main/xml/[Namespace]/[Type].xml
-
.NET Framework-specific remarks/docs/links: Remove any .NET Framework-specific remarks/docs/links.Already removed from this repo. -
Remarks for unsupported .NET versions: Remove and discard.Already removed from this repo. -
Remarks: Backport all
<remarks>from XML, including notes and para elements. Convert XML entities (<→<,>→>). -
Code examples:
- Create a separate
.Examples.csfile insrc/libraries/[Library]/tests/[Type].Examples.cs. Example file. - Use
#region RegionNameblocks for each example - Reference from docs:
<code lang="cs" source="[relativepath]/[Type].Examples.cs" region="RegionName" />(or, in Markdown,[!code-csharp[]([relativepath]/[Type].Examples.cs#[region])]) - Use relative paths from source file to samples directory (e.g.,
../../../../tests/...) - Use
Assertto verify stated output of the code example, but place that code outside the region that will be included in the docs. - (Note: we still need to implement a solution for copying code files to the docs repo - see [Code snippet importer] Add tooling to import code snippet files docs-tools#805.)
- Create a separate
-
Avoid duplication: Only document in shared/CoreCLR files, not in Mono-specific partials unless behavior differs
-
src vs. ref: Documentation should go in the source implementation files, not the ref assembly
-
Multiple implementations: For assemblies with multiple runtime-specific, OS-specific, or architecture-specific implementations. Jan's suggestion is to add partial methods to the neutral file and keep the documentation there.
-
XML syntax conventions:
- Use
<see langword="null"/>for keywords (null,true,false,void) - Use
<see cref="Type"/>for types and members - Use
<c>code</c>tags for inline code elements, NOT backticks - Use
<note type="note">for notes - Use
<para>for paragraph breaks in remarks
- Use
-
<xref:>API links, which is a Markdown syntax, don't render in IntelliSense. For Markdown sections, convert xref links to fully qualified HTML links to the API in the form https://learn.microsoft.com/dotnet/api/.... -
Very lengthy remarks: If remarks are very long, still port them to the dotnet/runtime repo, but put them in a separate "docs" directory and then link there from the ///.
-
Once all the public types in a given assembly have been documented, remove
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>from its .csproj file.
To be done separately:
- Disable the Edit functionality on learn.microsoft.com by setting
open_to_public_contributorstofalsefor the namespace (or individual types if the assembly doesn't encompass the entire namespace) here. - Similarly to the previous bullet point, update the GitOps policy that aims to prevent any docs-repo edits to the namespace (or individual types if the assembly doesn't encompass the entire namespace) here.
- If the assembly doesn't ship as part of the shared framework (it's part of the shared framework if it's listed here), i.e. it ships as a standalone NuGet package, remove the package name from this list.
- If the assembly does ship as part of the shared framework, add it to the list of XML files to push to the binaries repo for docs CI pipeline ingestion.
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsSlipped
- StatusShow more project fieldsSlipped
- StatusShow more project fieldsSlipped
- StatusShow more project fieldsSlipped
- StatusShow more project fields👀 In review
Activity
[-]Synchronize dotnet-api-docs descriptions to dotnet/runtime ///[/-][+]Renconcile dotnet-api-docs descriptions with dotnet/runtime ///[/+][-]Renconcile dotnet-api-docs descriptions with dotnet/runtime ///[/-][+]Reconcile dotnet-api-docs descriptions with dotnet/runtime ///[/+]25 remaining items
Backport System.Text.RegularExpressions XML docs from dotnet-api-docs…
Backport System.Text.RegularExpressions XML docs from dotnet-api-docs…