Skip to content

Commit

Permalink
Merge pull request #10598 from MicrosoftDocs/main638737706373895223sy…
Browse files Browse the repository at this point in the history
…nc_temp

For protected branch, push strategy should use PR and merge to target branch method to work around git push error
  • Loading branch information
learn-build-service-prod[bot] authored Jan 29, 2025
2 parents b001699 + 6559744 commit 46794f8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
26 changes: 17 additions & 9 deletions docs/test/microsoft-code-coverage-console-tool.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Microsoft.CodeCoverage.Console tool
description: Use the Microsoft.CodeCoverage.Console tool to collect code coverage for C++ and C# code in nontest scenarios, and merge and convert code coverage reports.
ms.date: 09/16/2024
ms.date: 01/28/2025
ms.topic: conceptual
ms.author: mikejo
manager: mijacobs
Expand All @@ -11,15 +11,21 @@ monikerRange: '>= vs-2022'
---
# Microsoft.CodeCoverage.Console tool

Microsoft.CodeCoverage.Console is a command-line tool. You can use it to collect code coverage for C++ and C# code. It supports also merging and converting code coverage reports. This tool can be used to collect code coverage in non-test scenarios (for example, for a simple console application).
Microsoft.CodeCoverage.Console is a command-line tool that you can use to collect code coverage for C++ and C# code. It also supports merging and converting code coverage reports. This tool can be used to collect code coverage in non-test scenarios (for example, for a simple console application).

Microsoft.CodeCoverage.Console is available in Visual Studio 2022 17.3 under the folder `Common7\IDE\Extensions\Microsoft\CodeCoverage.Console`. You can use it in a Developer Command Prompt and a Developer PowerShell:
This tool is an extension to the [dotnet-coverage](/dotnet/core/additional-tools/dotnet-coverage) dotnet tool that adds support for the following scenarios:

- Adds security features to enable collecting ASP.NET code coverage data from IIS.
- Collecting code coverage for C++ code.

>[!NOTE]
> The tool is available only with Visual Studio Enterprise. For .NET code coverage, you can alternatively use the command-line tool, [dotnet-coverage](/dotnet/core/additional-tools/dotnet-coverage).
Microsoft.CodeCoverage.Console is available in Visual Studio 2022 17.3 under the folder `Common7\IDE\Extensions\Microsoft\CodeCoverage.Console`. You can use it in a Developer Command Prompt and a Developer PowerShell:

```console
C:\Program Files\Microsoft Visual Studio\2022\Enterprise> Microsoft.CodeCoverage.Console --help
D:\ConsoleApplication\x64\Debug>Microsoft.CodeCoverage.Console --help

Description:
Code coverage tools.

Expand All @@ -43,7 +49,7 @@ Commands:

## Collect, connect, shutdown, merge, snapshot, and uninstrument commands

The Microsoft.CodeCoverage.Console tool is extension to the [dotnet-coverage](/dotnet/core/additional-tools/dotnet-coverage) dotnet tool. The documentation for collect, connect, shutdown, merge, snapshot, and uninstrument commands can be found [here](/dotnet/core/additional-tools/dotnet-coverage).
The Microsoft.CodeCoverage.Console tool is an extension to the [dotnet-coverage](/dotnet/core/additional-tools/dotnet-coverage) dotnet tool. The documentation for collect, connect, shutdown, merge, snapshot, and uninstrument commands can be found [here](/dotnet/core/additional-tools/dotnet-coverage).

Microsoft.CodeCoverage.Console supports additional security features to enable collecting ASP.NET code coverage data from IIS. Additionally, the Microsoft.CodeCoverage.Console tool supports collecting code coverage for C++ code. The `instrument` command is specific to these scenarios.

Expand Down Expand Up @@ -73,7 +79,7 @@ Microsoft.CodeCoverage.Console instrument

* **`-s|--settings <settings>`**

Sets the path to the XML code coverage settings.
Sets the path to the XML code coverage settings. The settings file can be used to exclude some modules or methods from code coverage analysis. The format is the same as the data collector configuration inside a *.runsettings* file. For more information, see [Customize code coverage analysis](../test/customizing-code-coverage-analysis.md).

* **`-id|--session-id <session-id>`**

Expand Down Expand Up @@ -108,7 +114,7 @@ D:\ConsoleApplication\x64\Debug> .\ConsoleApplication.exe
Hello World!
```

### Code coverage using collect command with configuration file
### Code coverage using collect command with configuration file (C++)

If you don't want to use the `instrument` command, you can instead use a configuration file to specify the files to instrument, as follows:

Expand All @@ -129,7 +135,9 @@ Hello World!
Code coverage results: output.coverage.
```

### Code coverage using instrument and collect commands
The settings file can be used to exclude some modules or methods from code coverage analysis. The format is the same as the data collector configuration inside a *.runsettings* file. For more information, see [Customize code coverage analysis](../test/customizing-code-coverage-analysis.md).

### Code coverage using instrument and collect commands (C++)

Before collecting code coverage data, first instrument the binary as follows:

Expand All @@ -147,7 +155,7 @@ Hello World!
Code coverage results: output.coverage.
```

### Code coverage using instrument command and collect command in server mode
### Code coverage using instrument command and collect command in server mode (C++)

Using this method, you can separate code coverage collection from running your application. First, instrument your binary as follows:

Expand Down
4 changes: 2 additions & 2 deletions subscriptions/assign-license-bulk.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To add large groups of users, you can use the bulk add feature, or if your organ

## Use Bulk add to assign subscriptions

> [!VIDEO https://medius.microsoft.com/Embed/video-nc/6e8cd58e-548b-4019-9b36-ec6462c0666b?r=499726314265]
> [!VIDEO https://medius.microsoft.com/Embed/video-nc/3bf6504c-8d82-4466-b6fb-93d46fdf9b17?r=553875033020]
## Follow these steps to use the Bulk add feature:

Expand Down Expand Up @@ -91,7 +91,7 @@ Using this feature makes it easy to stay on top of your subscription assignments

## Watch this video or read on to learn more about adding subscribers using the Microsoft Entra group feature.

> [!VIDEO https://medius.microsoft.com/Embed/video-nc/3bf6504c-8d82-4466-b6fb-93d46fdf9b17?r=553875033020]
> [!VIDEO https://medius.microsoft.com/Embed/video-nc/6e8cd58e-548b-4019-9b36-ec6462c0666b?r=499726314265]
1. Sign in to the Visual Studio Subscriptions Admin Portal at [https://manage.visualstudio.com](https://manage.visualstudio.com).

Expand Down

0 comments on commit 46794f8

Please sign in to comment.