Skip to content

Commit

Permalink
Adding condition to disable MsCoverage refrenced path maps (#5189)
Browse files Browse the repository at this point in the history
  • Loading branch information
fhnaseer authored Aug 27, 2024
1 parent d677692 commit b189b54
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

</Target>

<PropertyGroup Condition="'$(NETCoreSdkVersion)' != ''">
<PropertyGroup Condition="'$(NETCoreSdkVersion)' != '' and '$(DisableMsCoverageReferencedPathMaps)' != 'true'">
<_msCoverageSdkNETCoreSdkVersion>$(NETCoreSdkVersion)</_msCoverageSdkNETCoreSdkVersion>
<_msCoverageSdkNETCoreSdkVersion Condition="$(_msCoverageSdkNETCoreSdkVersion.Contains('-'))">$(_msCoverageSdkNETCoreSdkVersion.Split('-')[0])</_msCoverageSdkNETCoreSdkVersion>
<_msCoverageSdkMinVersionWithDependencyTarget>6.0.100</_msCoverageSdkMinVersionWithDependencyTarget>
Expand All @@ -34,7 +34,7 @@

<!-- This target required to store deterministic sources mapping.
It is modified version of https://github.com/coverlet-coverage/coverlet/blob/d1ca364b7dbff38abce0457d94c4ce1b7e3a4cd9/src/coverlet.collector/build/coverlet.collector.targets#L35 -->
<Target Condition="'$(NETCoreSdkVersion)' != ''" Name="MsCoverageReferencedPathMaps" BeforeTargets="CoreCompile" DependsOnTargets="ResolveProjectReferences" >
<Target Condition="'$(NETCoreSdkVersion)' != '' and '$(DisableMsCoverageReferencedPathMaps)' != 'true'" Name="MsCoverageReferencedPathMaps" BeforeTargets="CoreCompile" DependsOnTargets="ResolveProjectReferences" >
<MSBuild Projects="@(AnnotatedProjects->'%(FullPath)')"
Targets="$(_msCoverageSourceRootTargetName)"
Properties="TargetFramework=%(AnnotatedProjects.NearestTargetFramework)"
Expand Down

0 comments on commit b189b54

Please sign in to comment.