Closed atharkes closed 1 year ago
If I use automatic detection it also seems to detect the .runsettings file twice. Which would explain why there are two matches found where the invalid operation exception is thrown.
========== Starting test discovery ==========
========== Test discovery skipped: All test containers are up to date ==========
Using automatically detected runsettings file(s). To learn more visit https://aka.ms/vs-runsettings.
Using automatically detected runsettings file(s). To learn more visit https://aka.ms/vs-runsettings.
No C++ projects found in the solution. Dynamic C++ code coverage will be disabled. Static C++ code coverage will be enabled. If report is missing some C++ projects please enable /PROFILE linker option. More information: https://docs.microsoft.com/visualstudio/test/customizing-code-coverage-analysis#static-and-dynamic-native-instrumentation
========== Starting test run ==========
...
@atharkes Adding uri should fix the issue. <DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0">
Thanks that seems to work <3
Description
I'm trying to make a custom .runsettings file but if I add a DataCollector tag with a friendlyName of Code Coverage vstest throws and exception and messes up the code coverage results.
Steps to reproduce
.runsettings file:
Expected behavior
Settings to be correctly applied to the Code Coverage datacollector.
Actual behavior
Exception is thrown and code coverage results are incorrect/incomplete because of it.
Diagnostic logs
Environment
Tested Visual Studio versions:
AB#1887046