Directory.build.targets 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  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);USE_ASYNC_ITERATOR</DefineConstants>
  22. </PropertyGroup>
  23. <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netstandard2.0'">
  24. <DefineConstants>$(DefineConstants);USE_ASYNC_ITERATOR;HAS_ASYNCENUMERABLE;HAS_ASYNCDISPOSABLE;BCL_HAS_CONFIGUREAWAIT;HAS_VALUETUPLE</DefineConstants>
  25. </PropertyGroup>
  26. <PropertyGroup>
  27. <Product>$(AssemblyName) ($(TargetFramework))</Product>
  28. </PropertyGroup>
  29. </Project>