Skip to content

Commit 9b9304a

Browse files
authored
Merge branch 'main' into alexbuckgit/docutune-autopr-docs-link-absolute-20220831-035716-3621420
2 parents b3c181a + 45c6506 commit 9b9304a

File tree

463 files changed

+2131
-2381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

463 files changed

+2131
-2381
lines changed

.github/workflows/stale-issues.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ name: close-stale-issues
77
on:
88
schedule:
99
- cron: "0 0 * * 4"
10+
workflow_dispatch:
1011

1112
permissions:
1213
contents: read
@@ -18,7 +19,7 @@ jobs:
1819
pull-requests: write # for actions/stale to close stale PRs
1920
runs-on: ubuntu-latest
2021
steps:
21-
- uses: actions/stale@v5.1.1
22+
- uses: actions/stale@v4.0.0
2223
with:
2324
repo-token: ${{ secrets.GITHUB_TOKEN }}
2425
stale-issue-message: 'Thanks for sharing your feedback. We apologize for our delayed response. Due to the sheer volume of feedback in our repo, we have decided to prioritize the newest issues and are automatically closing our oldest issues with an Issues bot. If you believe your feedback is still actionable, then either respond directly in this issue or open a new documentation issue and we’ll review. If no activity occurs in the next 14 days, this issue will be closed.'

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
pull-requests: write
1414

1515
steps:
16-
- uses: actions/stale@v5.1.1
16+
- uses: actions/stale@v4.0.0
1717
with:
1818
repo-token: ${{ secrets.GITHUB_TOKEN }}
1919
days-before-pr-stale: 14

docker/tutorials/tutorial-persist-data-layer-docker-app-with-vscode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The files created in one container aren't available in another.
6666
cat /data.txt
6767
```
6868

69-
The terminal shows a number between 1 and 1000.
69+
The terminal shows a number between 1 and 10000.
7070

7171
To use the command line to see this result, get the container ID by using the `docker ps` command, and run the following command.
7272

docs/azure/vs-azure-tools-azure-project-create.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Visual Studio provides a project template that lets you create an [Azure cloud s
1818
## Steps to create an Azure cloud service project in Visual Studio
1919
This section walks you through creating an Azure cloud service project in Visual Studio with one or more web roles.
2020

21-
::: moniker range=">=vs-2019"
2221
1. From the start window, choose **Create a new project**.
2322

2423
1. In the search box, type in *Cloud*, and then choose **Azure Cloud Service**.
@@ -28,8 +27,6 @@ This section walks you through creating an Azure cloud service project in Visual
2827
1. Give the project a name and choose **Create**.
2928

3029
![Give the project a name](./media/vs-azure-tools-azure-project-create/vs-2019/new-project-cloud-service-2.png)
31-
::: moniker-end
32-
3330
1. In the **New Microsoft Azure Cloud Service** dialog, select the roles that you want to add, and choose the right arrow button to add them to your solution.
3431

3532
![Select new Azure cloud service roles](./media/vs-azure-tools-azure-project-create/new-cloud-service.png)

docs/code-quality/ca2240.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ The following example fixes the two previous violations by providing an override
6969
:::code language="vb" source="../snippets/visualbasic/VS_Snippets_CodeAnalysis/FxCop.Usage.ImplementISerializableCorrectly2/vb/FxCop.Usage.ImplementISerializableCorrectly2.vb" id="Snippet1":::
7070
---
7171

72-
7372
## Related rules
7473

7574
- [CA2236: Call base class methods on ISerializable types](../code-quality/ca2236.md)

docs/code-quality/code-metrics-values.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,9 @@ The following list shows the code metrics results that Visual Studio calculates:
4141

4242
- **Class Coupling** - Measures the coupling to unique classes through parameters, local variables, return types, method calls, generic or template instantiations, base classes, interface implementations, fields defined on external types, and attribute decoration. Good software design dictates that types and methods should have high cohesion and low coupling. High coupling indicates a design that is difficult to reuse and maintain because of its many interdependencies on other types. For more information, see [Class coupling](code-metrics-class-coupling.md).
4343

44-
::: moniker range=">=vs-2019"
45-
4644
- **Lines of Source code** - Indicates the exact number of source code lines that are present in your source file, including blank lines. This metric is available starting in Visual Studio 2019 version 16.4 and Microsoft.CodeAnalysis.Metrics (2.9.5).
4745

4846
- **Lines of Executable code** - Indicates the approximate number of executable code lines or operations. This is a count of number of operations in executable code. This metric is available starting in Visual Studio 2019 version 16.4 and Microsoft.CodeAnalysis.Metrics (2.9.5). The value is typically a close match to the previous metric, **Lines of Code**, which is the MSIL-instruction-based metric used in legacy mode.
49-
::: moniker-end
50-
5147

5248
## Anonymous methods
5349

docs/code-quality/disable-code-analysis.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ Examples:
108108

109109
::: moniker-end
110110

111-
112111
## See also
113112

114113
- [Suppress violations](use-roslyn-analyzers.md#suppress-violations)

docs/code-quality/how-to-configure-code-analysis-for-a-managed-code-project.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,15 @@ In Visual Studio, you can choose from a list of code analysis [rule sets](../cod
4141

4242
2. In the **Configuration** and **Platform** lists, choose the build configuration and target platform.
4343

44-
45-
::: moniker range=">=vs-2019"
46-
4744
3. To run code analysis every time the project is built using the selected configuration, select **Run on build** in the **Binary analyzers** section. You can also run legacy code analysis manually, see [How to: Run Legacy Code Analysis Manually for Managed Code](how-to-run-legacy-code-analysis-manually-for-managed-code.md) for more details.
4845

49-
::: moniker-end
50-
5146
4. To view warnings from generated code, clear the **Suppress results from generated code** check box.
5247

5348
> [!NOTE]
5449
> This option does not suppress code analysis errors and warnings from generated code when the errors and warnings appear in forms and templates. You can both view and maintain the source code for a form or a template, and it won't be overwritten.
5550
56-
57-
::: moniker range=">=vs-2019"
58-
5951
5. In the **Active rules** list, do one of the following:
6052

61-
::: moniker-end
62-
6353
- Select the rule set that you want to use.
6454

6555
- Select **\<Browse>** to find an existing custom rule set that is not in the list.

docs/code-quality/how-to-create-a-custom-rule-set.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,8 @@ To create a custom rule set, you can open a built-in rule set in the **rule set
2929

3030
2. On the **Properties** pages, select the **Code Analysis** tab.
3131

32-
33-
::: moniker range=">=vs-2019"
34-
3532
3. In the **Active rules** drop-down list, do one of the following:
3633

37-
::: moniker-end
38-
3934
- Choose the rule set that you want to customize.
4035

4136
\- or -
@@ -68,13 +63,8 @@ You can create a new rule set file from the **New File** dialog:
6863

6964
2. On the **Properties** pages, select the **Code Analysis** tab.
7065

71-
72-
::: moniker range=">=vs-2019"
73-
7466
3. Select **\<Choose multiple rule sets>** from **Active rules**.
7567

76-
::: moniker-end
77-
7868
4. In the **Add or Remove Rule Sets** dialog box, choose the rule sets you want to include in your new rule set.
7969

8070
![Add or remove rule sets dialog box](media/add-remove-rule-sets.png)

docs/code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ To enable or disable legacy code analysis:
2626

2727
3. Specify the build type in **Configuration** and the target platform in **Platform**. (Non-.NET Core/.NET Standard projects only.)
2828

29-
30-
::: moniker range=">=vs-2019"
31-
3229
4. To enable or disable automatic code analysis, select or clear the **Run on build** check box in the **Binary analyzers** section.
3330

3431
![Run binary code analysis on build option in Visual Studio](media/run-on-build-binary-analyzers.png)
@@ -37,7 +34,5 @@ To enable or disable legacy code analysis:
3734

3835
`<RunCodeAnalysis>false</RunCodeAnalysis>`
3936

40-
::: moniker-end
41-
4237
> [!NOTE]
4338
> Disabling binary code analysis on build does not affect [.NET Compiler Platform-based code analyzers](roslyn-analyzers-overview.md), which always execute at build if you installed them as a NuGet package. For information about disabling analysis from these analyzers, see [How to disable source code analysis](disable-code-analysis.md).

docs/code-quality/how-to-generate-code-metrics-data.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ The results are generated and the **Code Metrics Results** window is displayed.
8888

8989
The results are generated and the **Code Metrics Results** window is displayed. To view the results details, expand the tree in the **Hierarchy**.
9090

91-
9291
## Command-line code metrics
9392

9493
You can generate code metrics data from the command line for C# and Visual Basic projects for .NET Framework, .NET Core, and .NET Standard apps. To run code metrics from the command line, install the [Microsoft.CodeAnalysis.Metrics NuGet package](#microsoftcodeanalysismetrics-nuget-package) or build the [Metrics.exe](#metricsexe) executable yourself.
@@ -146,8 +145,6 @@ Build succeeded.
146145

147146
The generated XML output takes the following format:
148147

149-
::: moniker range=">=vs-2019"
150-
151148
```xml
152149
<?xml version="1.0" encoding="utf-8"?>
153150
<CodeMetricsReport Version="1.0">
@@ -203,8 +200,6 @@ The generated XML output takes the following format:
203200
</CodeMetricsReport>
204201
```
205202

206-
::: moniker-end
207-
208203

209204
### Metrics.exe
210205

@@ -246,20 +241,14 @@ For more information, see [Enable generating code metrics in legacy mode](https:
246241

247242
### Previous versions
248243

249-
::: moniker range=">=vs-2019"
250244
Visual Studio 2015 included a command-line code metrics tool that was also called *Metrics.exe*. This previous version of the tool did a binary analysis, that is, an assembly-based analysis. The newer version of the *Metrics.exe* tool analyzes source code instead. Because the newer *Metrics.exe* tool is source code-based, command-line code metrics results may be different to those generated by the Visual Studio IDE and by previous versions of *Metrics.exe*. Starting in Visual Studio 2019, the Visual Studio IDE analyzes source code like the command-line tool and the results should be the same.
251245

252-
::: moniker-end
253-
254246

255247
The new command-line code metrics tool computes metrics even in the presence of source code errors, as long as the solution and project can be loaded.
256248

257249
#### Metric value differences
258250

259-
::: moniker range=">=vs-2019"
260251
Starting in Visual Studio 2019 version 16.4 and Microsoft.CodeAnalysis.Metics (2.9.5), `SourceLines` and `ExecutableLines` replace the previous `LinesOfCode` metric. For descriptions of the new metrics, see [Code metrics values](../code-quality/code-metrics-values.md). The `LinesOfCode` metric is available in legacy mode.
261-
::: moniker-end
262-
263252

264253
Other metrics such as `CyclomaticComplexity` and `MaintainabilityIndex` use the same formulas as previous versions of *Metrics.exe*, but the new tool counts the number of `IOperations` (logical source instructions) instead of intermediate language (IL) instructions. The numbers will be slightly different to those generated by the Visual Studio IDE and by previous versions of *Metrics.exe*.
265254

docs/code-quality/how-to-synchronize-code-project-rule-sets-with-team-project-check-in-policy.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,8 @@ You synchronize the code analysis settings for code projects to the check-in pol
3434

3535
2. Click **Code Analysis**.
3636

37-
38-
::: moniker range=">=vs-2019"
39-
4037
3. In the **Active rules** list, select the check-in policy rule set.
4138

42-
::: moniker-end
43-
4439
## To specify a custom check-in policy rule set
4540

4641
1. If necessary, perform a get operation on the rule set file that specifies the check-in policy.
@@ -49,13 +44,8 @@ You synchronize the code analysis settings for code projects to the check-in pol
4944

5045
3. Click **Code Analysis**.
5146

52-
53-
::: moniker range=">=vs-2019"
54-
5547
4. In the **Active rules** list, click **\<Browse>**.
5648

57-
::: moniker-end
58-
5949
5. In the **Open** dialog box, specify the check-in policy rule set file.
6050

6151
## To create a custom rule set for a code project

docs/code-quality/implementing-custom-code-analysis-check-in-policies-for-managed-code.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,8 @@ You specify a project check-in policy rule set as the code analysis rule set of
109109

110110
4. If necessary, click the appropriate options in the **Configuration** and **Platform** lists.
111111

112-
113-
::: moniker range=">=vs-2019"
114-
115112
5. To run code analysis every time that the code project is built using the specified configuration, select **Run on build** in the **Binary analyzers** section.
116113

117-
::: moniker-end
118-
119114
6. In the **Run this rule set** list, click **\<Browse>**.
120115

121116
8. Select the local version of the check-in policy rule set file.

docs/code-quality/in-source-suppression-overview.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,10 @@ ms.workload:
2424

2525
It is often useful to indicate that a warning is not applicable. Suppressing code analysis violations indicates team members the code was reviewed, and the warning can be suppressed. The following sections describe the different ways to suppress code analysis violations using the Visual Studio IDE.
2626

27-
::: moniker range=">=vs-2019"
28-
2927
## Suppress violations using the EditorConfig file
3028

3129
In an **EditorConfig file**, set the severity to `none`, for example, `dotnet_diagnostic.CA1822.severity = none`. To add an EditorConfig file, see [Add an EditorConfig file to a project](../ide/create-portable-custom-editor-options.md#add-and-remove-editorconfig-files).
3230

33-
::: moniker-end
34-
3531
## Suppress violations in source code
3632

3733
You can suppress violations in code using a preprocessor directive, the [#pragma warning (C#)](/dotnet/csharp/language-reference/preprocessor-directives#pragma-warning) or [Disable (Visual Basic)](/dotnet/visual-basic/language-reference/directives/disable-enable) directive to suppress the warning for only a specific line of code. Or, you can use the [SuppressMessage attribute](#in-source-suppression-and-the-suppressmessage-attribute).
@@ -42,13 +38,11 @@ You can suppress violations in code using a preprocessor directive, the [#pragma
4238

4339
If you choose **in Source**, you see a preview of the preprocessor directive that will be added to your code.
4440

45-
::: moniker range=">=vs-2019"
4641
:::image type="content" source="media/vs-2019/suppress-diagnostic-from-editor.png" alt-text="Suppress diagnostic from quick actions menu":::
4742

4843
If you choose **in Source (attribute)**, you see a preview of the [SuppressMessage attribute](#in-source-suppression-and-the-suppressmessage-attribute) that will be added to your code.
4944

5045
:::image type="content" source="media/vs-2019/suppress-diagnostic-from-editor-attribute.png" alt-text="Suppress diagnostic from quick actions menu using attribute":::
51-
::: moniker-end
5246

5347
- From the **Error List**
5448

@@ -75,12 +69,8 @@ The [global suppression file](#global-level-suppressions) uses the [SuppressMess
7569

7670
- From the **code editor**, place the cursor in the line of code with the violation and press **Quick actions and refactorings** (or press **Ctrl**+**Period (.)**) to open the **Quick Actions** menu. Select **Suppress CAXXXX**, and then choose **in Suppression File**. You see a preview of the [global suppression file](#global-level-suppressions) that will be created or modified.
7771

78-
::: moniker range=">=vs-2019"
79-
8072
- From the **Analyze** menu, select **Analyze** > **Build and Suppress Active Issues** on the menu bar to suppress all current violations. Suppressing all current violations is sometimes referred to as "baselining".
8173

82-
::: moniker-end
83-
8474

8575
## Suppress violations using project settings
8676

@@ -101,21 +91,15 @@ In C++/CLI, use the macros CA\_SUPPRESS\_MESSAGE or CA\_GLOBAL\_SUPPRESS_MESSAGE
10191
> [!NOTE]
10292
> You should not use in-source suppressions on release builds, to prevent shipping the in-source suppression metadata accidentally.
10393
104-
105-
::: moniker range=">=vs-2019"
106-
10794
> [!NOTE]
10895
> If you migrate a project to Visual Studio 2019, you might suddenly be faced with a large number of code analysis warnings. If you aren't ready to fix the warnings, you can suppress all of them by selecting **Analyze** > **Build and Suppress Active Issues**.
10996
110-
::: moniker-end
111-
11297
### SuppressMessage attribute
11398

11499
When you select **Suppress** from the context or right-click menu of a code analysis warning in the **Error List**, a <xref:System.Diagnostics.CodeAnalysis.SuppressMessageAttribute> attribute is added either in your code or to the project's global suppression file.
115100

116101
The <xref:System.Diagnostics.CodeAnalysis.SuppressMessageAttribute> attribute has the following format:
117102

118-
119103
### [C#](#tab/csharp)
120104
```csharp
121105
[Scope:SuppressMessage("Rule Category", "Rule Id", Justification = "Justification", MessageId = "MessageId", Scope = "Scope", Target = "Target")]

docs/code-quality/install-roslyn-analyzers.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,13 @@ Visual Studio includes a core set of .NET Compiler Platform (*Roslyn*) analyzers
3636

3737
## To install VSIX analyzers
3838

39-
40-
::: moniker range=">=vs-2019"
41-
4239
1. In Visual Studio, select **Extensions** > **Manage Extensions**.
4340

4441
The **Manage Extensions** dialog box opens.
4542

4643
> [!NOTE]
4744
> Alternatively, you can find and download the analyzer extension directly from [Visual Studio Marketplace](https://marketplace.visualstudio.com).
4845
49-
::: moniker-end
50-
5146
2. Expand **Online** in the left pane, and then select **Visual Studio Marketplace**.
5247

5348
3. In the search box, type the name of the analyzer extension you want to install.
@@ -68,13 +63,8 @@ Visual Studio includes a core set of .NET Compiler Platform (*Roslyn*) analyzers
6863

6964
8. Open Visual Studio again.
7065

71-
72-
::: moniker range=">=vs-2019"
73-
7466
If you want to check whether the extension is installed, select **Extensions** > **Manage Extensions**. In the **Manage Extensions** dialog box, select the **Installed** category on the left, and then search for the extension by name.
7567

76-
::: moniker-end
77-
7868
## Next steps
7969

8070
> [!div class="nextstepaction"]

docs/code-quality/static-code-analysis-for-managed-code-overview.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,9 @@ Public class MyClass
5555

5656
For more information, see [Suppress warnings](../code-quality/in-source-suppression-overview.md).
5757

58-
59-
::: moniker range=">=vs-2019"
60-
6158
> [!NOTE]
6259
> If you migrate a project to Visual Studio 2019, you might suddenly be faced with a large number of code analysis warnings. If you aren't ready to fix the warnings, you can suppress all of them by choosing **Analyze** > **Build and Suppress Active Issues**.
6360
64-
::: moniker-end
65-
6661
## Run code analysis as part of check-in policy
6762

6863
As an organization, you might want to require that all check-ins satisfy certain policies. In particular, you want to make sure that you follow these policies:

docs/code-quality/use-roslyn-analyzers.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ Following is the converted EditorConfig file:
245245
# Code files
246246
[*.{cs,vb}]
247247

248-
249248
dotnet_diagnostic.CA1001.severity = warning
250249

251250
dotnet_diagnostic.CA1821.severity = warning

docs/code-quality/walkthrough-analyzing-managed-code-for-code-defects.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,10 @@ This article steps you through the process of using legacy analysis to analyze y
5858

5959
3. Choose the **Code Analysis** tab.
6060

61-
62-
::: moniker range=">=vs-2019"
63-
6461
4. Make sure that **Run on build** is selected in the **Binary analyzers** section.
6562

6663
5. From the **Active rules** drop-down list, select **Microsoft All Rules**.
6764

68-
::: moniker-end
69-
7065
6. On the **File** menu, click **Save Selected Items**, and then close the properties pages.
7166

7267
7. On the **Build** menu, click **Build CodeAnalysisManagedDemo**.

docs/containers/container-launch-settings.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ ms.topic: reference
1313

1414
In the *Properties* folder in an ASP.NET Core project, you can find the launchSettings.json file, which contains settings that control how your web app is started on your development machine. For detailed information on how this file is used in ASP.NET development, see [Use multiple environments in ASP.NET Core](/aspnet/core/fundamentals/environments?view=aspnetcore-2.2&preserve-view=true). In *launchSettings.json*, the settings in the **Docker** section are related to how Visual Studio handles containerized apps.
1515

16-
::: moniker range=">=vs-2019"
17-
1816
```json
1917
"Docker": {
2018
"commandName": "Docker",
@@ -31,11 +29,8 @@ In the *Properties* folder in an ASP.NET Core project, you can find the launchSe
3129
}
3230
```
3331

34-
::: moniker-end
35-
3632
The commandName setting identifies that this section applies to Container Tools. The following table shows the properties that can be set in this section:
3733

38-
3934
::: moniker range="vs-2019"
4035

4136
| Setting name | Example | Description |

0 commit comments

Comments
 (0)