Skip to content

Commit 5223496

Browse files
author
Jakub Chocholowicz
committed
C++ native code coverage for console app
1 parent d18c406 commit 5223496

File tree

8 files changed

+30
-0
lines changed

8 files changed

+30
-0
lines changed

samples/VisualStudio/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
6. [**Scenario 06** C++ code coverage in Visual Studio](scenarios/scenario06/README.md)
99
7. [**Scenario 07** C++ code coverage in Visual Studio ARM64](scenarios/scenario07/README.md)
1010
8. [**Scenario 08** Static code coverage for ASP.NET Core Web App (Razor Pages) in IIS](scenarios/scenario08/README.md)
11+
9. [**Scenario 09** C++ code coverage for Console App in Developer PowerShell for VS Enterprise](scenarios/scenario09/README.md)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Scenario Description
2+
3+
Static C++ code coverage for new Native Console App project in Visual Studio.
4+
5+
## Collect C++ code coverage Console App
6+
7+
1. Open Visual Studio Enterprise
8+
9+
2. Create new Native Console App project.
10+
11+
![alt text](create.png "Create C++ Console App Project.")
12+
13+
3. Enable **Profile** (Configuration Properties->Linker->Advanced) flag for all projects in solution
14+
15+
![alt text](profile-flag.png "Profile linker flag.")
16+
17+
4. Build solution
18+
19+
![alt text](build.png "Build solution")
20+
21+
5. Collect code coverage in Developer PowerShell for VS Enterprise
22+
```console
23+
Microsoft.CodeCoverage.Console.exe collect --include-files .\x64\Debug\** .\x64\Debug\ConsoleApplication1.exe
24+
```
25+
![alt text](collect.png "Collect code coverage")
26+
27+
6. View code coverage results
28+
29+
![alt text](results.png "Code coverage results.")
48.2 KB
Loading
34.5 KB
Loading
51.5 KB
Loading
83.4 KB
Loading
107 KB
Loading
247 KB
Loading

0 commit comments

Comments
 (0)