You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Contribute/content/dotnet/api-documentation.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: How to write /// docs for .NET API ref
3
-
ms.date: 06/29/2023
3
+
ms.date: 06/17/2025
4
4
author: gewarren
5
5
ms.author: gewarren
6
6
ms.service: learn
@@ -9,7 +9,7 @@ description: Learn how to write good descriptions in source code for generating
9
9
---
10
10
# How to write good /// docs for .NET API reference
11
11
12
-
The ultimate goal for .NET API docs is to have the /// XML comments in the .NET source code be the "source of truth". For MSBuild, ASP.NET Core, and EF Core, this goal has been met. However, currently the [dotnet-api-docs repo](https://github.com/dotnet/dotnet-api-docs) remains the source of truth for core .NET API reference. [This dotnet/runtime issue](https://github.com/dotnet/runtime/issues/44969) tracks the effort to backport .NET docs and make the [dotnet/runtime](https://github.com/dotnet/runtime) repo the source of truth.
12
+
The ultimate goal for .NET API docs is to have the `///` XML comments in the .NET source code be the "source of truth". For MSBuild, ASP.NET Core, and EF Core, this goal has been met. However, currently the [dotnet-api-docs repo](https://github.com/dotnet/dotnet-api-docs) remains the source of truth for some namespaces in the .NET API reference. [This dotnet/runtime issue](https://github.com/dotnet/runtime/issues/44969) tracks the effort to backport .NET docs and make the [dotnet/runtime](https://github.com/dotnet/runtime) repo the source of truth. The presence or absence of the "edit" button on a page often indicates that the `dotnet-api-docs` repository is the source of truth. If it's missing, the source of truth is likely the `///` comments in the source repo.
13
13
14
14
This article provides tips about writing good doc comments *within the source code itself*.
Copy file name to clipboardExpand all lines: Contribute/content/dotnet/dotnet-pr-review.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: The .NET docs do not have the PR merger webhooks enabled. This arti
4
4
ms.topic: contributor-guide
5
5
ms.service: learn
6
6
ms.custom: external-contributor-guide
7
-
ms.date: 06/24/2020
7
+
ms.date: 06/17/2025
8
8
---
9
9
# Pull request review process for the .NET docs repositories
10
10
@@ -31,20 +31,20 @@ Reviews follow one of the three paths based on the PR:
31
31
-**Major contributions** - Major contributions are significant edits to an existing article, new articles, or edits to a number of articles.
32
32
-**Work in progress** - Authors can can create a PR that is marked as not ready for review yet by opening a *draft* pull request.
33
33
34
-
The processing used by the Contributor License Agreement (CLA) bot is a good guideline for the distinction between "small" and "large" contributions. PRs that do not require the CLA to be signed are likely "small." PRs that do require the CLA are likely "large."
34
+
The processing used by the Contributor License Agreement (CLA) bot is a good guideline for the distinction between "small" and "large" contributions. PRs that do not require the CLA to be signed are likely "small." PRs that do require the CLA are likely "large." The CLA needs to be signed once by each contributor, so this is an imperfect guide.
35
35
36
36
### Small PRs
37
37
38
38
The changes in small PRs are reviewed for accuracy and checked using the build on the review site. Because they are small, these PRs do not trigger a review of the entire article.
39
39
40
-
Reviewers may notice other small changes that would improve an article. If those changes are also small, suggest them as review comments. If the suggested changes would trigger a larger review, open an issue and address those later.
40
+
Reviewers might notice other small changes that would improve an article. If those changes are also small, reviewers might suggest them as review comments. If the suggested changes would trigger a larger review, reviewers will ask to open an issue and address those later.
41
41
42
42
### Larger changes
43
43
44
44
Larger PRs undergo a more thorough review. The following are all checked:
45
45
46
-
- Sample code must be included in the PR, in source and as a downloadable zip file.
47
-
- Sample code compiles and runs correctly.
46
+
- Sample code must be included in the PR in source.
47
+
- Sample code compiles and runs correctly using a supported .NET version.
48
48
- The article clearly describes the goals for the reader, and those goals are met.
49
49
- The article meets [style and grammar guidelines](dotnet-style-guide.md) and follows our [voice and tone principles](dotnet-voice-tone.md).
50
50
- All links should resolve correctly.
@@ -59,7 +59,7 @@ You may want feedback earlier in the process. Open a draft PR and add a comment
59
59
60
60
## Explain suggestions
61
61
62
-
GitHub lets you enter comments in triple-back-tick blocks of type `suggestion` that are displayed as a diff and can be merged by clicking a button. On short lines, GitHub does a good job of highlighting the changes. On longer lines, such as a long paragraph in one line of text, GitHub doesn't highlight the changes. When entering a suggestion for a long line, notice whether your changes are clearly highlighted. If the changes aren't highlighted, include comments outside the suggestion block explaining what you changed. Without an explanation it's often time-consuming for subsequent reviewers or the PR author to figure out what the changes are.
62
+
GitHub lets you enter comments in triple-back-tick blocks of type `suggestion` that are displayed as a diff and can be merged by clicking a button. When entering a suggestion, include comments outside the suggestion block explaining what you changed. Without an explanation it's often time-consuming for subsequent reviewers or the PR author to figure out what the changes are.
You can find the UIDs of types, a member overload list, or a particular overloaded member from `https://xref.learn.microsoft.com/autocomplete`. The query string `?text=*\<type-member-name>*` identifies the type or member whose UIDs you'd like to see. For example, `https://xref.learn.microsoft.com/autocomplete?text=string.format` retrieves the [String.Format](/dotnet/api/system.string.format) overloads. The tool searches for the provided `text` query parameter in any part of the UID. For example, you can search for member name (ToString), partial member name (ToStri), type and member name (Double.ToString), etc.
117
-
118
116
If you add a \* (or `%2A`) after the UID, the link then represents the overload page and not a specific API. For example, you can use that when you want to link to the [List\<T>.BinarySearch Method](/dotnet/api/system.collections.generic.list-1.binarysearch) page in a generic way instead of a specific overload such as [List\<T>.BinarySearch(T, IComparer\<T>)](/dotnet/api/system.collections.generic.list-1.binarysearch#System_Collections_Generic_List_1_BinarySearch__0_). You can also use \* to link to a member page when the member is not overloaded; this saves you from having to include the parameter list in the UID.
119
117
120
118
To link to a specific method overload, you must include the fully qualified type name of each of the method's parameters. For example, \<xref:System.DateTime.ToString> links to the parameterless [DateTime.ToString](/dotnet/api/system.datetime.tostring#System_DateTime_ToString) method, while \<xref:System.DateTime.ToString(System.String,System.IFormatProvider)> links to the [DateTime.ToString(String,IFormatProvider)](/dotnet/api/system.datetime.tostring#System_DateTime_ToString_System_String_System_IFormatProvider_) method.
@@ -167,21 +165,23 @@ A custom style is available for lists. You can render lists with green check mar
167
165
168
166
```markdown
169
167
> [!div class="checklist"]
170
-
> * How to create a .NET Core app
171
-
> * How to add a reference to the Microsoft.XmlSerializer.Generator package
172
-
> * How to edit your MyApp.csproj to add dependencies
173
-
> * How to add a class and an XmlSerializer
174
-
> * How to build and run the application
168
+
>
169
+
> - How to create a .NET Core app
170
+
> - How to add a reference to the Microsoft.XmlSerializer.Generator package
171
+
> - How to edit your MyApp.csproj to add dependencies
172
+
> - How to add a class and an XmlSerializer
173
+
> - How to build and run the application
175
174
```
176
175
177
176
This renders as:
178
177
179
178
> [!div class="checklist"]
180
-
> * How to create a .NET Core app
181
-
> * How to add a reference to the Microsoft.XmlSerializer.Generator package
182
-
> * How to edit your MyApp.csproj to add dependencies
183
-
> * How to add a class and an XmlSerializer
184
-
> * How to build and run the application
179
+
>
180
+
> - How to create a .NET Core app
181
+
> - How to add a reference to the Microsoft.XmlSerializer.Generator package
182
+
> - How to edit your MyApp.csproj to add dependencies
183
+
> - How to add a class and an XmlSerializer
184
+
> - How to build and run the application
185
185
186
186
You can see an example of checked lists in action in the [.NET Core docs](/dotnet/core/additional-tools/xml-serializer-generator).
0 commit comments