diff --git a/README.md b/README.md index 90b12df..62c0b5f 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ Code coverage results: output.coverage. For existing projects to get latest features and best performance please keep up to date below references: ```xml - - + + ``` If your solution doesn't contain any C++ code it is recommended to disable native code coverage by adding into configuration below flags: diff --git a/samples/VisualStudio/README.md b/samples/VisualStudio/README.md index d4fae0c..5cf2c27 100644 --- a/samples/VisualStudio/README.md +++ b/samples/VisualStudio/README.md @@ -8,3 +8,4 @@ 6. [**Scenario 06** C++ code coverage in Visual Studio](scenarios/scenario06/README.md) 7. [**Scenario 07** C++ code coverage in Visual Studio ARM64](scenarios/scenario07/README.md) 8. [**Scenario 08** Static code coverage for ASP.NET Core Web App (Razor Pages) in IIS](scenarios/scenario08/README.md) +9. [**Scenario 09** C++ code coverage for Console App in Developer PowerShell for VS Enterprise](scenarios/scenario09/README.md) diff --git a/samples/VisualStudio/scenarios/scenario09/README.md b/samples/VisualStudio/scenarios/scenario09/README.md new file mode 100644 index 0000000..0f94ee7 --- /dev/null +++ b/samples/VisualStudio/scenarios/scenario09/README.md @@ -0,0 +1,29 @@ +# Scenario Description + +Static C++ code coverage for new Native Console App project in Visual Studio. + +## Collect C++ code coverage Console App + +1. Open Visual Studio Enterprise + +2. Create new Native Console App project. + + ![alt text](create.png "Create C++ Console App Project.") + +3. Enable **Profile** (Configuration Properties->Linker->Advanced) flag for all projects in solution + + ![alt text](profile-flag.png "Profile linker flag.") + +4. Build solution + + ![alt text](build.png "Build solution") + +5. Collect code coverage in Developer PowerShell for VS Enterprise +```console +Microsoft.CodeCoverage.Console.exe collect --include-files .\x64\Debug\** .\x64\Debug\ConsoleApplication1.exe +``` +![alt text](collect.png "Collect code coverage") + +6. View code coverage results + + ![alt text](results.png "Code coverage results.") \ No newline at end of file diff --git a/samples/VisualStudio/scenarios/scenario09/analyze.png b/samples/VisualStudio/scenarios/scenario09/analyze.png new file mode 100644 index 0000000..4fdb09b Binary files /dev/null and b/samples/VisualStudio/scenarios/scenario09/analyze.png differ diff --git a/samples/VisualStudio/scenarios/scenario09/build.png b/samples/VisualStudio/scenarios/scenario09/build.png new file mode 100644 index 0000000..2687bda Binary files /dev/null and b/samples/VisualStudio/scenarios/scenario09/build.png differ diff --git a/samples/VisualStudio/scenarios/scenario09/collect.png b/samples/VisualStudio/scenarios/scenario09/collect.png new file mode 100644 index 0000000..e117cf8 Binary files /dev/null and b/samples/VisualStudio/scenarios/scenario09/collect.png differ diff --git a/samples/VisualStudio/scenarios/scenario09/create.png b/samples/VisualStudio/scenarios/scenario09/create.png new file mode 100644 index 0000000..06d0094 Binary files /dev/null and b/samples/VisualStudio/scenarios/scenario09/create.png differ diff --git a/samples/VisualStudio/scenarios/scenario09/profile-flag.png b/samples/VisualStudio/scenarios/scenario09/profile-flag.png new file mode 100644 index 0000000..4ab5708 Binary files /dev/null and b/samples/VisualStudio/scenarios/scenario09/profile-flag.png differ diff --git a/samples/VisualStudio/scenarios/scenario09/results.png b/samples/VisualStudio/scenarios/scenario09/results.png new file mode 100644 index 0000000..2397980 Binary files /dev/null and b/samples/VisualStudio/scenarios/scenario09/results.png differ