System.Linq.Async.csproj 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <Project Sdk="Microsoft.NET.Sdk">
  2. <PropertyGroup>
  3. <!--
  4. .NET 10.0 gets its own target because that doesn't need a transitive reference
  5. to System.Linq.AsyncEnumerable - it's built in from .NET 10.0 and later -
  6. but all other targets do need that reference.
  7. Even though we support back to .NET 8.0 for v7, we don't build targets for
  8. any versions older than net10.0 because net8.0 and net9.0 are both covered
  9. by the netstandard2.0 target.
  10. -->
  11. <TargetFrameworks>net48;netstandard2.0;netstandard2.1;net10.0</TargetFrameworks>
  12. <Title>System.Linq.Async</Title>
  13. <PackageTags>LINQ;async;streams;query</PackageTags>
  14. <Description>Provides support for Language-Integrated Query (LINQ) over IAsyncEnumerable&lt;T&gt; sequences.</Description>
  15. </PropertyGroup>
  16. <ItemGroup>
  17. <!--
  18. Incorporate the reference assemblies.
  19. -->
  20. <None Include="../refs/System.Linq.Async/bin/$(Configuration)/$(TargetFramework)/**"
  21. PackagePath="ref/$(TargetFramework)"
  22. Pack="true" />
  23. </ItemGroup>
  24. <PropertyGroup>
  25. <!--
  26. The ref assembly defines the public API visible at compile time, so it should not include any methods for which
  27. System.Linq.AsyncEnumerable defines source-compatible replacements, because their continued availability would
  28. cause compile-time ambiguity.
  29. We retain the code because we continue to make these methods available in the runtime assembly (in the lib folder)
  30. to provide binary compatibility. This project builds the runtime assembly, so we need to include these methods.
  31. -->
  32. <DefineConstants>$(DefineConstants);INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES</DefineConstants>
  33. </PropertyGroup>
  34. <!--
  35. These warnings occur because we are deliberately creating a lib/ref mismatch. There doesn't seem to be
  36. an official way to do that, so we have to suppress the warnings.
  37. See ../../Documentation/adr/0001-Ix-Ref-Assembly-Mismatches.md for an explanation of this bizarreness.
  38. -->
  39. <PropertyGroup>
  40. <!--
  41. NU5128: lib/ref mismatch. This is deliberate, as explained in the ADR.
  42. NU5131: spurious missing file errors. It appears that the build is confused by what we're doing.
  43. CS0618: Type or member is obsolete - this whole library is essentially obsolete, so internal use of obsolete features is OK and widespread.
  44. -->
  45. <NoWarn>$(NoWarn);NU5128;NU5131;CS0618</NoWarn>
  46. </PropertyGroup>
  47. <PropertyGroup>
  48. <!--
  49. IDE0301 uses collection expressions in places where they don't necessarily have the same effect, which we want to avoid in case of possible compatibility issues.
  50. IDE0305 wants to turn things like list.ToArray into [..list], which we don't find to be an improvement in readability. -->
  51. <NoWarn>$(NoWarn);IDE0301;IDE0305</NoWarn>
  52. </PropertyGroup>
  53. <ItemGroup>
  54. <None Include="System\Linq\AsyncEnumerable.AsyncOverloads.cs">
  55. <DesignTime>True</DesignTime>
  56. <AutoGen>True</AutoGen>
  57. <DependentUpon>AsyncEnumerable.AsyncOverloads.tt</DependentUpon>
  58. </None>
  59. <None Include="System\Linq\Operators\Select.Opt.Generated.cs">
  60. <DesignTime>True</DesignTime>
  61. <AutoGen>True</AutoGen>
  62. <DependentUpon>Select.Opt.Generated.tt</DependentUpon>
  63. </None>
  64. <None Include="System\Linq\Operators\Where.Opt.Generated.cs">
  65. <DesignTime>True</DesignTime>
  66. <AutoGen>True</AutoGen>
  67. <DependentUpon>Where.Opt.Generated.tt</DependentUpon>
  68. </None>
  69. </ItemGroup>
  70. <ItemGroup>
  71. <!--
  72. System.Linq.Async is being deprecated by System.Linq.AsyncEnumerable (part of .NET 10, but available to older runtimes via NuGet)
  73. but System.Linq.AsyncEnumerable does not include all of System.Linq.Async's functionality. We're moving that functionality into
  74. System.Interactive.Async, because that is the home of IAsyncEnumerable features that are LINQ-adjacent but not build into
  75. the .NET runtime libraries.
  76. By referencing System.Interactive.Async here, we make that functionality available to users of System.Linq.Async until such
  77. time as they remove their reference to this library.
  78. -->
  79. <ProjectReference Include="..\System.Interactive.Async\System.Interactive.Async.csproj" Aliases="SystemInteractiveAsync" />
  80. <ProjectReference Include="..\System.Linq.Async.SourceGenerator\System.Linq.Async.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" Private="false" />
  81. </ItemGroup>
  82. <ItemGroup Condition="'$(TargetFramework)' != 'net10.0'">
  83. <PackageReference Include="System.Linq.AsyncEnumerable" Version="10.0.0-rc.1.25451.107" Aliases="SystemLinqAsyncEnumerable" />
  84. </ItemGroup>
  85. <Target Name="_SetAliasOnBuiltInSystemLinqAsyncEnumerable" BeforeTargets="ResolveAssemblyReferences">
  86. <ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
  87. <Reference Condition="'%(Reference.AssemblyName)' == 'System.Linq.AsyncEnumerable'">
  88. <Aliases>SystemLinqAsyncEnumerable</Aliases>
  89. </Reference>
  90. </ItemGroup>
  91. </Target>
  92. <ItemGroup>
  93. <Compile Update="System\Linq\AsyncEnumerable.AsyncOverloads.cs">
  94. <DesignTime>True</DesignTime>
  95. <AutoGen>True</AutoGen>
  96. <DependentUpon>AsyncEnumerable.AsyncOverloads.tt</DependentUpon>
  97. </Compile>
  98. <Compile Update="System\Linq\Operators\Average.Generated.cs">
  99. <DependentUpon>Average.Generated.tt</DependentUpon>
  100. <DesignTime>True</DesignTime>
  101. <AutoGen>True</AutoGen>
  102. </Compile>
  103. <Compile Update="System\Linq\Operators\MinMax.Generated.cs">
  104. <DependentUpon>MinMax.Generated.tt</DependentUpon>
  105. <DesignTime>True</DesignTime>
  106. <AutoGen>True</AutoGen>
  107. </Compile>
  108. <Compile Update="System\Linq\Operators\Select.Opt.Generated.cs">
  109. <DesignTime>True</DesignTime>
  110. <AutoGen>True</AutoGen>
  111. <DependentUpon>Select.Opt.Generated.tt</DependentUpon>
  112. </Compile>
  113. <Compile Update="System\Linq\Operators\Sum.Generated.cs">
  114. <DependentUpon>Sum.Generated.tt</DependentUpon>
  115. <DesignTime>True</DesignTime>
  116. <AutoGen>True</AutoGen>
  117. </Compile>
  118. <Compile Update="System\Linq\Operators\Where.Opt.Generated.cs">
  119. <DesignTime>True</DesignTime>
  120. <AutoGen>True</AutoGen>
  121. <DependentUpon>Where.Opt.Generated.tt</DependentUpon>
  122. </Compile>
  123. </ItemGroup>
  124. <ItemGroup>
  125. <None Update="System\Linq\AsyncEnumerable.AsyncOverloads.tt">
  126. <Generator>TextTemplatingFileGenerator</Generator>
  127. <LastGenOutput>AsyncEnumerable.AsyncOverloads.cs</LastGenOutput>
  128. </None>
  129. <None Update="System\Linq\Operators\Average.Generated.tt">
  130. <LastGenOutput>Average.Generated.cs</LastGenOutput>
  131. <Generator>TextTemplatingFileGenerator</Generator>
  132. </None>
  133. <None Update="System\Linq\Operators\MinMax.Generated.tt">
  134. <LastGenOutput>MinMax.Generated.cs</LastGenOutput>
  135. <Generator>TextTemplatingFileGenerator</Generator>
  136. </None>
  137. <None Update="System\Linq\Operators\Select.Opt.Generated.tt">
  138. <Generator>TextTemplatingFileGenerator</Generator>
  139. <LastGenOutput>Select.Opt.Generated.cs</LastGenOutput>
  140. </None>
  141. <None Update="System\Linq\Operators\Sum.Generated.tt">
  142. <LastGenOutput>Sum.Generated.cs</LastGenOutput>
  143. <Generator>TextTemplatingFileGenerator</Generator>
  144. </None>
  145. <None Update="System\Linq\Operators\Where.Opt.Generated.tt">
  146. <Generator>TextTemplatingFileGenerator</Generator>
  147. <LastGenOutput>Where.Opt.Generated.cs</LastGenOutput>
  148. </None>
  149. </ItemGroup>
  150. <ItemGroup>
  151. <Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
  152. </ItemGroup>
  153. </Project>