1 <!-- 2 *********************************************************************************************** 3 Microsoft.CodeCoverage.targets 4 5 WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have 6 created a backup copy. Incorrect changes to this file will make it 7 impossible to load or build your test projects from the command-line or the IDE. 8 9 Copyright (c) Microsoft. All rights reserved. 10 *********************************************************************************************** 11 --> 12 13 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 14 15 <!-- This target required to enable /collect:"Code Coverage" in "dotnet publish" scenario with "dotnet vstest". 16 E.g: Release pipelines where user/project nuget cache not available on current machine. --> 17 <Target Name="CopyTraceDataCollectorArtifacts" AfterTargets="ComputeFilesToPublish"> 18 19 <ItemGroup> 20 <TraceDataCollectorArtifacts Include="$(MSBuildThisFileDirectory)\**\*.*" /> 21 </ItemGroup> 22 23 <Copy SourceFiles="@(TraceDataCollectorArtifacts)" DestinationFolder="$(PublishDir)%(RecursiveDir)" /> 24 25 </Target> 26 </Project>