Skip to content

Commit 5e8ec7e

Browse files
committed
Fix Ix.NET build break on Ubuntu 24 (#2209)
* Remove netcoreapp3.1 from tests. It looks like this runtime no longer works on the hosted agents. (This means we currently have no way to test netcoreapp2.1.) * Fix tests that suddenly no longer compile. I think this may be due to the compiler fixing what was technically a bug * Put build agent back to Windows. The Ubuntu-24 agents dropped support for mono and MSBuild.
1 parent 4ade945 commit 5e8ec7e

File tree

14 files changed

+33
-39
lines changed

14 files changed

+33
-39
lines changed

Ix.NET/Source/Ix.NET.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ VisualStudioVersion = 17.2.32131.331
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{87534290-A7A6-47A4-9A3A-D0D21A9AD1D4}"
77
ProjectSection(SolutionItems) = preProject
8-
NetCore31TestReadme.txt = NetCore31TestReadme.txt
8+
NetStandard21TestReadme.txt = NetStandard21TestReadme.txt
99
EndProjectSection
1010
EndProject
1111
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B733D97A-F1ED-4FC3-BF8E-9AC47A89DE96}"

Ix.NET/Source/NetCore31TestReadme.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Ix.NET 6.0 offers a .NET Standard 2.1 target, but currently, we have no way of testing this.
2+
3+
We used to test this target by running tests in .NET Core 3.1. Unfortunately, the test runners now crash when running tests in .NET Core 3.1. .NET Core 3.1 has long since been out of support, so there's not much we can do about this. (It now reports the absence of ssllib on the hosted build agents.)
4+
5+
Although current versions of .NET (but not .NET Framework) support .NET Standard 2.1, they are all going to prefer the net6.0 target. It might be possible to test via Mono instead, or possibly even Unity, but this would likely involve additional CI/CD work. But for now this target is untested. If we can't find a way to test netstandard2.1, that suggests there's no scenario in which it is useful now, so we may remove it in a future release.

Ix.NET/Source/System.Interactive.Async.Providers.Tests/System.Interactive.Async.Providers.Tests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<!-- See NetCore31TestReadme.txt for why we still use netcoreapp3.1 -->
5-
<TargetFrameworks>net48;net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>net48;net8.0;net6.0</TargetFrameworks>
65
<NoWarn>$(NoWarn);CS0618</NoWarn>
76
</PropertyGroup>
87

Ix.NET/Source/System.Interactive.Async.Tests/System.Interactive.Async.Tests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<!-- See NetCore31TestReadme.txt for why we still use netcoreapp3.1 -->
5-
<TargetFrameworks>net48;net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>net48;net8.0;net6.0</TargetFrameworks>
65

76
<!--
87
CA1510: Use ArgumentNullException.ThrowIfNull - not available on .NET 4.8

Ix.NET/Source/System.Interactive.Async.Tests/System/Linq/Operators/Distinct.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ public async Task Distinct6()
4141
{
4242
var xs = new[] { 1, 2, 1, 3, 5, 2, 1, 4 }.ToAsyncEnumerable().Distinct(k => k);
4343

44-
var res = new[] { 1, 2, 3, 5, 4 };
45-
Assert.True(res.SequenceEqual(await xs.ToArrayAsync()));
44+
var expected = new[] { 1, 2, 3, 5, 4 };
45+
var actual = await xs.ToArrayAsync();
46+
Assert.True(expected.SequenceEqual(actual));
4647
}
4748

4849
[Fact]

Ix.NET/Source/System.Interactive.Tests/System.Interactive.Tests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<!-- See NetCore31TestReadme.txt for why we still use netcoreapp3.1 -->
5-
<TargetFrameworks>net48;net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>net48;net8.0;net6.0</TargetFrameworks>
65

76
<!--
87
CA1822: Make member static. Not necessary for test code.

Ix.NET/Source/System.Linq.Async.Queryable.Tests/System.Linq.Async.Queryable.Tests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<!-- See NetCore31TestReadme.txt for why we still use netcoreapp3.1 -->
5-
<TargetFrameworks>net48;net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>net48;net8.0;net6.0</TargetFrameworks>
65
<NoWarn>$(NoWarn);CS0618</NoWarn>
76
</PropertyGroup>
87

Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<!-- See NetCore31TestReadme.txt for why we still use netcoreapp3.1 -->
5-
<TargetFrameworks>net48;net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>net48;net8.0;net6.0</TargetFrameworks>
65

76
<!--
87
CA1510: Use ArgumentNullException.ThrowIfNull - not available on .NET 4.8

Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Concat.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ public async Task Concat_Three_ToArray()
104104

105105
var c = xs.Concat(ys).Concat(zs);
106106

107-
var res = new[] { 1, 2, 3, 4, 5, 6, 7, 8 };
108-
Assert.True(res.SequenceEqual(await c.ToArrayAsync()));
107+
var expected = new[] { 1, 2, 3, 4, 5, 6, 7, 8 };
108+
var actual = await c.ToArrayAsync();
109+
Assert.True(expected.SequenceEqual(actual));
109110
}
110111

111112
[Fact]

0 commit comments

Comments
 (0)