Directory.build.targets 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  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;CRIPPLED_REFLECTION</DefineConstants>
  5. </PropertyGroup>
  6. <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.4'">
  7. <DefineConstants>$(DefineConstants);NO_CODE_COVERAGE_ATTRIBUTE;CRIPPLED_REFLECTION</DefineConstants>
  8. </PropertyGroup>
  9. <PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
  10. <DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY;NO_TASK_FROMEXCEPTION</DefineConstants>
  11. </PropertyGroup>
  12. <PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
  13. <DefineConstants>$(DefineConstants);USE_ASYNC_ITERATOR</DefineConstants>
  14. </PropertyGroup>
  15. <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' or '$(TargetFramework)' == 'netstandard2.1'">
  16. <DefineConstants>$(DefineConstants);USE_ASYNC_ITERATOR;HAS_ASYNCENUMERABLE;HAS_ASYNCDISPOSABLE;BCL_HAS_CONFIGUREAWAIT</DefineConstants>
  17. </PropertyGroup>
  18. <PropertyGroup>
  19. <Product>$(AssemblyName) ($(TargetFramework))</Product>
  20. </PropertyGroup>
  21. <ItemGroup>
  22. <!-- Workaround https://github.com/dotnet/sdk/issues/2976 -->
  23. <PackageReference Update="Microsoft.NETCore.Platforms" PrivateAssets="All" />
  24. </ItemGroup>
  25. <PropertyGroup Condition="'$(IsTestProject)' == 'true'">
  26. <UseSourceLink>true</UseSourceLink>
  27. <CoverletOutputFormat>cobertura</CoverletOutputFormat>
  28. <Exclude>[xunit.*]*</Exclude>
  29. <CoverletOutput>$(MSBuildThisFileDirectory)coverlet/raw/$(AssemblyName)/$(TargetFramework)/</CoverletOutput>
  30. <CollectCoverage Condition="'$(TF_BUILD)' == 'true'">true</CollectCoverage>
  31. </PropertyGroup>
  32. </Project>