123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <TargetFrameworks>net48;net10.0;net8.0</TargetFrameworks>
- <!--
- CA1510: Use ArgumentNullException.ThrowIfNull - not available on .NET 4.8
- CA1861: Extract constant arrays to 'static readonly' fields. With these tests we generally prioritize readability over performance.
- -->
- <NoWarn>$(NoWarn);CS0618;CS8603;CS8625;CA1510;CA1822;CA1861</NoWarn>
- </PropertyGroup>
- <ItemGroup>
- <Content Include="xunit.runner.json">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- </ItemGroup>
- <ItemGroup>
- <None Include="System\Linq\Operators\Average.Generated.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>Average.Generated.tt</DependentUpon>
- </None>
- <None Include="System\Linq\Operators\GroupBy.Generated.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>GroupBy.Generated.tt</DependentUpon>
- </None>
- <None Include="System\Linq\Operators\MinMax.Generated.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>MinMax.Generated.tt</DependentUpon>
- </None>
- <None Include="System\Linq\Operators\OrderBy.Generated.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>OrderBy.Generated.tt</DependentUpon>
- </None>
- </ItemGroup>
- <ItemGroup>
- <!--
- System.Linq.Async brings in a transitive dependency on System.Interactive.Async, because in normal use,
- the methods in System.Linq.Async that are not in System.Linq.AsyncEnumerable are now used via their new
- home in System.Interactive.Async. However, there's a complication: for binary compatibility we retain these
- methods in the System.Linq.Async runtime assemblies (lib), removing them from the ref assemblies so that
- they are invisible at compile time. However, that trick works only for references via the NuGet package; this
- test project has a direct project reference to System.Linq.Async meaning that it can see all the methods that
- are deliberately hidden at compile time in normal use. This particular test project actually wants to test
- those hidden methods (because we still need to ensure that code relying on the binary compatibility will work).
- So we set an alias on System.Interactive.Async to avoid picking up its extension methods unless we explicitly want to.
- -->
- <ProjectReference Include="..\System.Interactive.Async\System.Interactive.Async.csproj">
- <Aliases>SystemInteractiveAsync</Aliases>
- </ProjectReference>
- <ProjectReference Include="..\System.Linq.Async\System.Linq.Async.csproj" />
- </ItemGroup>
- <!--
- Since this tests the legacy System.Linq.Async package, we need prevent the compiler from using the .NET runtime library
- System.Linq.AsyncEnumerable package.
- So although we get this references transitively (or automatically on .NET 10.0+) we need to put them explicitly here to set aliases.
- -->
- <ItemGroup Condition="'$(TargetFramework)' != 'net10.0'">
- <PackageReference Include="System.Linq.AsyncEnumerable" Version="10.0.0-rc.1.25451.107" Aliases="SystemLinqAsyncEnumerable" />
- </ItemGroup>
- <Target Name="_SetAliasOnBuiltInSystemLinqAsyncEnumerable" BeforeTargets="ResolveAssemblyReferences">
- <ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
- <Reference Condition="'%(Reference.AssemblyName)' == 'System.Linq.AsyncEnumerable'">
- <Aliases>SystemLinqAsyncEnumerable</Aliases>
- </Reference>
- </ItemGroup>
- </Target>
- <ItemGroup>
- <PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
- <PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
- <PrivateAssets>all</PrivateAssets>
- <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
- </PackageReference>
- <PackageReference Include="FluentAssertions" Version="6.4.0" />
- <PackageReference Include="xunit" Version="2.9.3" />
- </ItemGroup>
- <ItemGroup>
- <None Update="System\Linq\Operators\Average.Generated.tt">
- <Generator>TextTemplatingFileGenerator</Generator>
- <LastGenOutput>Average.Generated.cs</LastGenOutput>
- </None>
- <None Update="System\Linq\Operators\GroupBy.Generated.tt">
- <Generator>TextTemplatingFileGenerator</Generator>
- <LastGenOutput>GroupBy.Generated.cs</LastGenOutput>
- </None>
- <None Update="System\Linq\Operators\MinMax.Generated.tt">
- <Generator>TextTemplatingFileGenerator</Generator>
- <LastGenOutput>MinMax.Generated.cs</LastGenOutput>
- </None>
- <None Update="System\Linq\Operators\OrderBy.Generated.tt">
- <Generator>TextTemplatingFileGenerator</Generator>
- <LastGenOutput>OrderBy.Generated.cs</LastGenOutput>
- </None>
- </ItemGroup>
- <ItemGroup>
- <Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
- </ItemGroup>
- <ItemGroup>
- <Compile Update="System\Linq\Operators\Average.Generated.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>Average.Generated.tt</DependentUpon>
- </Compile>
- <Compile Update="System\Linq\Operators\GroupBy.Generated.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>GroupBy.Generated.tt</DependentUpon>
- </Compile>
- <Compile Update="System\Linq\Operators\MinMax.Generated.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>MinMax.Generated.tt</DependentUpon>
- </Compile>
- <Compile Update="System\Linq\Operators\OrderBy.Generated.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>OrderBy.Generated.tt</DependentUpon>
- </Compile>
- </ItemGroup>
- </Project>
|