Directory.build.targets 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <Project>
  2. <!-- Workaround. Remove once we're on 3.1.300+
  3. https://github.com/dotnet/sourcelink/issues/572 -->
  4. <PropertyGroup>
  5. <TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
  6. </PropertyGroup>
  7. <ItemGroup>
  8. <EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
  9. </ItemGroup>
  10. <!-- This props all need to be set in targets as they depend on the values set earlier -->
  11. <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.0'">
  12. <DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY;NO_CODE_COVERAGE_ATTRIBUTE</DefineConstants>
  13. </PropertyGroup>
  14. <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.4'">
  15. <DefineConstants>$(DefineConstants);NO_CODE_COVERAGE_ATTRIBUTE</DefineConstants>
  16. </PropertyGroup>
  17. <PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
  18. <DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY;NO_TASK_FROMEXCEPTION</DefineConstants>
  19. </PropertyGroup>
  20. <PropertyGroup Condition="'$(TargetFramework)' == 'net46' or '$(TargetFramework)' == 'net461'">
  21. <DefineConstants>$(DefineConstants)</DefineConstants>
  22. </PropertyGroup>
  23. <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netstandard2.0'">
  24. <DefineConstants>$(DefineConstants);HAS_VALUETUPLE</DefineConstants>
  25. </PropertyGroup>
  26. <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' or '$(TargetFramework)' == 'netstandard2.1'">
  27. <DefineConstants>$(DefineConstants);HAS_ASYNC_ENUMERABLE_CANCELLATION</DefineConstants>
  28. </PropertyGroup>
  29. <PropertyGroup>
  30. <Product>$(AssemblyName) ($(TargetFramework))</Product>
  31. </PropertyGroup>
  32. </Project>