Skip to content

Commit f7744a8

Browse files
committed
add monikers
1 parent a91ef81 commit f7744a8

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-7
lines changed
3.5 KB
Loading

docs/ide/reference/generate-xml-documentation-comments.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,19 @@ You can distribute the compiler-generated XML file along with your .NET assembly
1919
2020
## Enable documentation generation
2121

22+
::: moniker range=">= vs-2022"
2223
To enable documentation generation, select the **Generate a file containing API documentation** checkbox on the **Build** > **Output** tab of your project's properties.
2324

2425
By default, a documentation file named the same as your assembly with an *.xml* file extension generates 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**.
26+
::: moniker-end
2527

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.
28+
::: moniker range="<= vs-2019"
29+
To enable documentation generation, select the **XML documentation file** checkbox in the **Build** > **Output** section of your project's properties.
30+
31+
By default, a documentation file named the same as your assembly with an *.xml* file extension generates 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.
32+
::: moniker-end
33+
34+
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. Use the `DocumentationFile` property to specify a different name or location.
2735

2836
If you use `DocumentationFile` by itself or with the `GenerateDocumentationFile` property set to `true`, a documentation file with the specified name and location is generated. However, if you set `GenerateDocumentationFile` to `false`, no documentation file is generated even if you set the `DocumentationFile` property.
2937

16.7 KB
Loading

docs/ide/walkthrough-creating-a-code-snippet.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,17 @@ You can create your own code snippets and add them to the code snippets that Vis
9090

9191
1. In the **Import Code Snippet** dialog box, select the **My Code Snippets** folder in the right pane. Select **Finish**, and then select **OK**.
9292

93-
1. The snippet is copied to one of the following locations, depending on the code language and version of Visual Studio that you're using:
93+
The snippet is copied to one of the following locations, depending on the code language:
9494

95-
- *%USERPROFILE%\Documents\Visual Studio 2022\Code Snippets\Visual C#\My Code Snippets*
96-
- *%USERPROFILE%\Documents\Visual Studio 2022\Code Snippets\Visual Basic\My Code Snippets*
97-
- *%USERPROFILE%\Documents\Visual Studio 2019\Code Snippets\Visual C#\My Code Snippets*
98-
- *%USERPROFILE%\Documents\Visual Studio 2019\Code Snippets\Visual Basic\My Code Snippets*
95+
::: moniker range=">= vs-2022"
96+
*%USERPROFILE%\Documents\Visual Studio 2022\Code Snippets\Visual C#\My Code Snippets*
97+
*%USERPROFILE%\Documents\Visual Studio 2022\Code Snippets\Visual Basic\My Code Snippets*
98+
::: moniker-end
99+
100+
::: moniker range="<= vs-2019"
101+
*%USERPROFILE%\Documents\Visual Studio 2019\Code Snippets\Visual C#\My Code Snippets*
102+
*%USERPROFILE%\Documents\Visual Studio 2019\Code Snippets\Visual Basic\My Code Snippets*
103+
::: moniker-end
99104

100105
1. Test your snippet by opening a C# or Visual Basic project. With a code file open in the editor, take one of the following actions:
101106

@@ -109,12 +114,17 @@ You can create your own code snippets and add them to the code snippets that Vis
109114

110115
The description field provides more information about your code snippet when viewed in the **Code Snippets Manager**. The shortcut is a tag you can type to insert your snippet.
111116

112-
1. To edit your snippet, open the snippet file from the following location, depending on the code language and version of Visual Studio that you're using:
117+
1. To edit your snippet, open the snippet file from one of the following locations, depending on the code language:
113118

119+
::: moniker range=">= vs-2022"
114120
- *%USERPROFILE%\Documents\Visual Studio 2022\Code Snippets\Visual C#\My Code Snippets/SquareRoot.snippet*
115121
- *%USERPROFILE%\Documents\Visual Studio 2022\Code Snippets\Visual Basic\My Code Snippets/SquareRoot.snippet*
122+
::: moniker-end
123+
124+
::: moniker range="<= vs-2019"
116125
- *%USERPROFILE%\Documents\Visual Studio 2019\Code Snippets\Visual C#\My Code Snippets/SquareRoot.snippet*
117126
- *%USERPROFILE%\Documents\Visual Studio 2019\Code Snippets\Visual Basic\My Code Snippets/SquareRoot.snippet*
127+
::: moniker-end
118128

119129
> [!TIP]
120130
> Because you're editing the file in the directory where Visual Studio placed it, you don't need to reimport it to Visual Studio.

0 commit comments

Comments
 (0)