@@ -6,7 +6,7 @@ ms.topic: reference
6
6
---
7
7
# dotnet-coverage code coverage utility
8
8
9
- ** This article applies to:** ✔️ .NET Core 3.1 SDK and later versions
9
+ ** This article applies to:** ✔️ .NET 8 SDK and later versions
10
10
11
11
## Synopsis
12
12
@@ -593,9 +593,8 @@ Hello, World!
593
593
If you don't want to use the ` instrument ` command, then the files to be instrumented can be specified using ` --include-files ` option as follows:
594
594
595
595
``` console
596
- D:\examples\ConsoleApp> dotnet-coverage collect --include-files .\bin\Debug\net7.0\*.dll dotnet run
597
- Microsoft (R) Code Coverage Command Line Tool (x64)
598
- Copyright (c) Microsoft Corporation. All rights reserved.
596
+ D:\examples\ConsoleApp> dotnet-coverage collect --include-files .\bin\Debug\net9.0\*.dll dotnet run
597
+ dotnet-coverage v17.14.1.0 [win-x64 - .NET 9.0.2]
599
598
600
599
SessionId: 57862ec0-e512-49a5-8b66-2804174680fc
601
600
Hello, World!
@@ -618,8 +617,7 @@ In this case, first binary needs to be instrumented as follows:
618
617
619
618
``` console
620
619
D:\examples\ConsoleApp> dotnet-coverage instrument .\bin\Debug\net7.0\ConsoleApp.dll
621
- Microsoft (R) Code Coverage Command Line Tool (x64)
622
- Copyright (c) Microsoft Corporation. All rights reserved.
620
+ dotnet-coverage v17.14.1.0 [win-x64 - .NET 9.0.2]
623
621
624
622
Input file successfully instrumented.
625
623
```
@@ -628,8 +626,7 @@ Then you can collect code coverage as follows:
628
626
629
627
``` console
630
628
D:\examples\ConsoleApp> dotnet-coverage collect .\bin\Debug\net7.0\ConsoleApp.exe
631
- Microsoft (R) Code Coverage Command Line Tool (x64)
632
- Copyright (c) Microsoft Corporation. All rights reserved.
629
+ dotnet-coverage v17.14.1.0 [win-x64 - .NET 9.0.2]
633
630
634
631
SessionId: a09e6bef-ff64-4b5f-8bb8-fc495ebb50ba
635
632
Hello, World!
@@ -642,8 +639,7 @@ In this case, you can completely separate coverage collection from running your
642
639
643
640
``` console
644
641
D:\examples\ConsoleApp> dotnet-coverage instrument --session-id 73c34ce5-501c-4369-a4cb-04d31427d1a4 .\bin\Debug\net7.0\ConsoleApp.dll
645
- Microsoft (R) Code Coverage Command Line Tool (x64)
646
- Copyright (c) Microsoft Corporation. All rights reserved.
642
+ dotnet-coverage v17.14.1.0 [win-x64 - .NET 9.0.2]
647
643
648
644
Input file successfully instrumented.
649
645
```
@@ -655,8 +651,7 @@ In the second step, you need to start coverage collector as follows:
655
651
656
652
``` console
657
653
D:\examples\ConsoleApp> dotnet-coverage collect --session-id 73c34ce5-501c-4369-a4cb-04d31427d1a4 --server-mode
658
- Microsoft (R) Code Coverage Command Line Tool (x64)
659
- Copyright (c) Microsoft Corporation. All rights reserved.
654
+ dotnet-coverage v17.14.1.0 [win-x64 - .NET 9.0.2]
660
655
661
656
SessionId: 73c34ce5-501c-4369-a4cb-04d31427d1a4
662
657
```
@@ -672,8 +667,7 @@ Finally, the collector can be closed as follows:
672
667
673
668
``` console
674
669
D:\examples\ConsoleApp> dotnet-coverage shutdown 73c34ce5-501c-4369-a4cb-04d31427d1a4
675
- Microsoft (R) Code Coverage Command Line Tool (x64)
676
- Copyright (c) Microsoft Corporation. All rights reserved.
670
+ dotnet-coverage v17.14.1.0 [win-x64 - .NET 9.0.2]
677
671
```
678
672
679
673
### Settings
0 commit comments