-
Notifications
You must be signed in to change notification settings - Fork 793
Expand file tree
/
Copy pathSystem.Linq.Async.Tests.csproj
More file actions
135 lines (121 loc) · 5.67 KB
/
Copy pathSystem.Linq.Async.Tests.csproj
File metadata and controls
135 lines (121 loc) · 5.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<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.6" 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="7.2.2" />
<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>