Browse Source

Update deterministic workaround

pull/1377/head
James Jackson-South 6 years ago
parent
commit
699c371915
  1. 2
      Directory.Build.targets
  2. 17
      src/Directory.Build.targets

2
Directory.Build.targets

@ -18,7 +18,7 @@
<!-- Package versions for package references across all projects --> <!-- Package versions for package references across all projects -->
<ItemGroup> <ItemGroup>
<!--Global Dependencies--> <!--Global Dependencies-->
<PackageReference Update="Microsoft.Net.Compilers.Toolset" PrivateAssets="All" Version="3.3.1" /> <PackageReference Update="Microsoft.Net.Compilers.Toolset" PrivateAssets="All" Version="3.7.0" />
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" /> <PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
<PackageReference Update="StyleCop.Analyzers" PrivateAssets="All" Version="1.1.118" /> <PackageReference Update="StyleCop.Analyzers" PrivateAssets="All" Version="1.1.118" />

17
src/Directory.Build.targets

@ -21,11 +21,20 @@
</PropertyGroup> </PropertyGroup>
<!-- Workaround for running Coverlet with Determenistic builds --> <!-- Workaround for running Coverlet with Determenistic builds -->
<!-- https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/DeterministicBuild.md --> <PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
</ItemGroup>
<ItemGroup>
<SourceRoot Include="$(NuGetPackageRoot)" />
</ItemGroup>
<Target Name="CoverletGetPathMap" <Target Name="CoverletGetPathMap"
DependsOnTargets="InitializeSourceRootMappedPaths" DependsOnTargets="InitializeSourceRootMappedPaths"
Returns="@(_LocalTopLevelSourceRoot)" Returns="@(_LocalTopLevelSourceRoot)"
Condition="'$(DeterministicSourcePaths)' == 'true'"> Condition="'$(DeterministicSourcePaths)' == 'true'">
<ItemGroup> <ItemGroup>
<_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/> <_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/>
</ItemGroup> </ItemGroup>

Loading…
Cancel
Save