You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading our build tools to 17.10, we started seeing .msCoverageSourceRootsMapping_testassembly files in a subfolder of our output folder.
We managed to trace these files back to the Microsoft.CodeCoverage package, where the MsCoverageReferencedPathMaps target was introduced. #4849
This target always runs when build, it does not allow the user to disable it.
Why are these files needed during the build if code coverage is not required? I don't want them if they are not needed.
The location where the files are stored cannot be controlled. In our environment, the files appear in a strange location "bin\debug\net6.0-windows10.0.19041\net6.0-windows10.0.19041\win-x64", while the test assembly itself is in "bin\debug\net6.0-windows10.0.19041". Not sure why the files end up in the wrong subfolder... looking at the code it should be using $(OutputPath). It would be good to add the option to override this path.
Nowhere in the (normal verbosity) build logs i could these files being generated.
We dont even use the Microsoft.CodeCoverage NuGet package. Which package pulls this in?
Steps to reproduce
Create a class library and a unit test project with a test. Build the projects and notice the .msCoverageSourceRootsMapping_TestProject2 being generated in the output folder.
Expected behavior
I expect properties are available that allow me to disable this functionality
I expect i have the option to set a property to override the rootPath used to write these files
I expect the tasks have some output to the log files
I dont even expect the Microsoft.CodeCoverage NuGet package to be used, it is not visible in my Visual Studio solution explorer
Actual behavior
Undesired files are written and i have no way to monitor and control this.
@fhnaseer, thank you for fixing our biggest problem with this target.
While making changes, may i suggest you add an option to overwrite/correct the targetdir as well?
As i mentioned in point 2, in our case the files do not end up next to the assembly, but 2 levels deeper, something clearly is going wrong there. For us it would work if we can override the root dir that is used in the _msCoverageSourceRootMappingFilePath property.
Description
After upgrading our build tools to 17.10, we started seeing .msCoverageSourceRootsMapping_testassembly files in a subfolder of our output folder.
We managed to trace these files back to the Microsoft.CodeCoverage package, where the MsCoverageReferencedPathMaps target was introduced.
#4849
This target always runs when build, it does not allow the user to disable it.
Steps to reproduce
Create a class library and a unit test project with a test. Build the projects and notice the .msCoverageSourceRootsMapping_TestProject2 being generated in the output folder.
Expected behavior
Actual behavior
Undesired files are written and i have no way to monitor and control this.
Environment
We have multiple .NET projects using
Visual Studio 2022 LTSC 17.10
.NET 6 SDK 6.0.424
Relevant packageReferences
The text was updated successfully, but these errors were encountered: