Directory.Build.targets 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. <Project>
  2. <!-- This props all need to be set in targets as they depend on the values set earlier -->
  3. <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.0'">
  4. <DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY;NO_CODE_COVERAGE_ATTRIBUTE</DefineConstants>
  5. </PropertyGroup>
  6. <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.4'">
  7. <DefineConstants>$(DefineConstants);NO_CODE_COVERAGE_ATTRIBUTE</DefineConstants>
  8. </PropertyGroup>
  9. <PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
  10. <DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY;NO_TASK_FROMEXCEPTION</DefineConstants>
  11. </PropertyGroup>
  12. <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netstandard2.0'">
  13. <DefineConstants>$(DefineConstants);HAS_VALUETUPLE</DefineConstants>
  14. </PropertyGroup>
  15. <PropertyGroup>
  16. <Product>$(AssemblyName) ($(TargetFramework))</Product>
  17. </PropertyGroup>
  18. <!-- Remove once coverlet supports this built-in -->
  19. <Target Name="CoverletGetPathMap"
  20. DependsOnTargets="InitializeSourceRootMappedPaths"
  21. Returns="@(_LocalTopLevelSourceRoot)"
  22. Condition="'$(DeterministicSourcePaths)' == 'true'">
  23. <ItemGroup>
  24. <_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/>
  25. </ItemGroup>
  26. </Target>
  27. </Project>