Fix Ix.NET build break on Ubuntu 24 #2209
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Azure DevOps Hosted Build Agents now run Ubuntu 24. One consequence is that mono is no longer available on the build agents—it is not supported on Ubuntu 24.
The Ix pipeline had been running on Ubuntu, which meant that the unit tests targetting .NET FX relied on mono. We can't do that any more. This PR changes the build agent back to Windows, so we can continue to test on .NET FX.
Also, the tests were crashing on .NET Core 3.1. That runtime has been out of support for a long time, but we had continued to use it as it was the only way to test our
netstandard2.1
support. I've had to disable this, so for now we don't execute tests against thenetstandard2.1
builds. It's possible that there's no longer any reason to offer this target, so we might need to remove that in the future.There's one more fix in this PR: the C# compiler seems to have tightened up its handling of left-to-right execution order in SDK 9.0.300, with the result that the project no longer built in the current version of Visual Studio. I think this is technically fixing a bug in the compiler, but it meant that some cases where we do code of this kind:
now fail because of a combination of factors:
SequenceEquals
used to resolve to anIEnumerable<T>
extension method, and still does on .NET FX, but on .NET it now resolves to an extension method onReadOnlySpan<T>
instead.ReadOnlySpan<T>
now happens before theawait
(which apparently didn't happen in older compilers) which means we're now asking the compiler to make a span survive across anawait
, which is not supportedSo I had to change some tests to get it building again.