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: docs/ide/reference/generate-xml-documentation-comments.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,9 @@ You can distribute the compiler-generated XML file along with your .NET assembly
19
19
20
20
## Enable documentation generation
21
21
22
-
To enable documentation generation, select **Generate a file containing API documentation** on the **Build** > **Output** tab of your project's properties.
22
+
To enable documentation generation, select the **Generate a file containing API documentation** checkbox on the **Build** > **Output** tab of your project's properties.
23
23
24
-
By default, a documentation file named the same as your assembly with an *.xml* file extension is generated in the same directory as the assembly. If you want to configure a non-default name or location for the file, enter or browse to an alternate location under **XML documentation file path**.
24
+
By default, the documentation file is named the same as your assembly with an *.xml* file extension and placed in the same directory as the assembly. If you want to configure a nondefault name or location for the file, enter or browse to an alternate location under **XML documentation file path**.
25
25
26
26
Alternatively, you can add the [GenerateDocumentationFile](/dotnet/core/project-sdk/msbuild-props#generatedocumentationfile) or [DocumentationFile](/dotnet/core/project-sdk/msbuild-props#documentationfile) properties to your *.csproj*, *.vbproj*, or *.fsproj* file. Set `GenerateDocumentationFile` to `true` to generate a documentation file with the default name and location. Add the `DocumentationFile` property to specify a different name or location.
27
27
@@ -47,8 +47,8 @@ You can set the [Comments](options-text-editor-csharp-advanced.md#comments) opti
47
47
48
48
The XML comment structure is immediately generated above the code element. For example, when commenting a method, the template generates the `<summary>` element, a `<param>` element for each parameter, and a `<returns>` element to document the return value.
49
49
50
-
```csharp
51
-
/// <summary>
50
+
```csharp
51
+
/// <summary>
52
52
///
53
53
/// </summary>
54
54
/// <paramname="id"></param>
@@ -57,7 +57,7 @@ You can set the [Comments](options-text-editor-csharp-advanced.md#comments) opti
57
57
{
58
58
return"username";
59
59
}
60
-
```
60
+
```
61
61
62
62
```vb
63
63
''' <summary>
@@ -83,7 +83,7 @@ You can set the [Comments](options-text-editor-csharp-advanced.md#comments) opti
83
83
return"username";
84
84
}
85
85
```
86
-
You can use styles in XML comments that render in Quick Info when you hover over the element. These styles include italics, bold, bulleted or numbered lists, and clickable `cref` or `href` links.
86
+
You can use XML elements and styles in comments that render in Quick Info when you hover over the element. These elements include italics, bold, bulleted or numbered lists, and clickable `cref` or `href` links.
87
87
88
88
For example, enter the following code in Visual Studio:
Copy file name to clipboardExpand all lines: docs/ide/walkthrough-creating-a-code-snippet.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ You can create your own code snippets and add them to the code snippets that Vis
56
56
57
57
1. Enter the title *Square Root* into the snippet `Title` element.
58
58
59
-
1. In the **Language** attribute of the `Code` element, fill in **CSharp** for a #C snippet ot**VB** for Visual Basic.
59
+
1. In the **Language** attribute of the `Code` element, fill in **CSharp** for a #C snippet or**VB** for Visual Basic.
60
60
61
61
> [!TIP]
62
62
> To see all the available language values, see [Attributes](code-snippets-schema-reference.md#attributes) in the [Code snippets schema reference](code-snippets-schema-reference.md).
@@ -127,7 +127,7 @@ The description field provides more information about your code snippet when vie
127
127
<Header>
128
128
<Title>Square Root</Title>
129
129
<Author>Myself</Author>
130
-
<Description>Calculates the square root of a number.</Description>
130
+
<Description>Calculates the square root of 16.</Description>
131
131
<Shortcut>sqrt</Shortcut>
132
132
</Header>
133
133
```
@@ -144,9 +144,9 @@ You might want the user to replace parts of a code snippet. For example, you mig
144
144
145
145
You can provide two types of replacements: literals and objects.
146
146
147
-
- Use the [Literal element](code-snippets-schema-reference.md#literal-element) to identify a replacement for a piece of code that's entirely contained within the snippet but can be customized after it's inserted into the code. For example a string or numeric value.
147
+
- Use the [Literal](code-snippets-schema-reference.md#literal-element)element to identify a replacement for a piece of code entirely contained within the snippet that be customized after being inserted into the code. For example, a string or numeric value.
148
148
149
-
- Use the [Object element](code-snippets-schema-reference.md#object-element) to identify an item that's required by the code snippet but is probably defined outside of the snippet itself. For example, an object instance or a control.
149
+
- Use the [Object](code-snippets-schema-reference.md#object-element)element to identify an item thatthe code snippet requires but is probably defined outside of the snippet itself. For example, an object instance or a control.
150
150
151
151
You can use a `Literal` element in the *SquareRoot.snippet* file to help users easily change the number to calculate the square root of.
152
152
@@ -167,7 +167,7 @@ You can use a `Literal` element in the *SquareRoot.snippet* file to help users e
167
167
</Snippet>
168
168
```
169
169
170
-
Notice that the literal replacement gets an ID, `Number`. You reference that ID from within the code snippet by surrounding it with `$` characters, as follows:
170
+
Notice that the literal replacement gets an ID, `Number`. You reference that ID in the code snippet by surrounding it with `$` characters, as follows:
171
171
172
172
```xml
173
173
<![CDATA[double root = Math.Sqrt($Number$);]]>
@@ -186,9 +186,9 @@ You can use a `Literal` element in the *SquareRoot.snippet* file to help users e
186
186
187
187
## Import a namespace
188
188
189
-
You can use a code snippet to add a `using` directive (C#) or `Imports` statement (Visual Basic) by including the [Imports element](code-snippets-schema-reference.md#imports-element). For .NET Framework projects, you can also add a reference to the project by using the [References element](code-snippets-schema-reference.md#references-element).
189
+
You can use a code snippet to add a `using` directive (C#) or `Imports` statement (Visual Basic) by including the [Imports](code-snippets-schema-reference.md#imports-element) element. For .NET Framework projects, you can also add a reference to the project by using the [References](code-snippets-schema-reference.md#references-element) element.
190
190
191
-
The following XML shows a code snippet that uses the method `File.Exists` in the System.IO namespace and, therefore, defines the **Imports** element to import the System.IO namespace.
191
+
The following XML shows a code snippet that uses the method `File.Exists` in the `System.IO` namespace, and therefore defines the **Imports** element to import the `System.IO` namespace.
192
192
193
193
```xml
194
194
<?xml version="1.0" encoding="utf-8"?>
@@ -215,4 +215,4 @@ The following XML shows a code snippet that uses the method `File.Exists` in the
215
215
## Related content
216
216
217
217
- For a reference to the Visual Studio IntelliSense Code Snippet XML schema, see [Code snippets schema reference](code-snippets-schema-reference.md).
218
-
- To create snippets in Visual Studio Code, see [Create your own snippets](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets)
218
+
- To create snippets in Visual Studio Code, see [Create your own snippets](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets).
0 commit comments