Skip to content

Conversation

idg10
Copy link
Collaborator

@idg10 idg10 commented Jun 10, 2025

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 the netstandard2.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:

someArray.SequenceEquals(await GetSomeOtherArrayAsync());

now fail because of a combination of factors:

  1. that SequenceEquals used to resolve to an IEnumerable<T> extension method, and still does on .NET FX, but on .NET it now resolves to an extension method on ReadOnlySpan<T> instead.
  2. the implicit conversion from array to ReadOnlySpan<T> now happens before the await (which apparently didn't happen in older compilers) which means we're now asking the compiler to make a span survive across an await, which is not supported

So I had to change some tests to get it building again.

idg10 added 4 commits June 10, 2025 06:39
It looks like this runtime no longer works on the hosted agents. (This means we currently have no way to test netcoreapp2.1.)

Also, fix tests that suddenly no longer compile. I think this may be due to the compiler fixing what was technically a bug that meant that this sort of code

var res = new[] { 1, 2, 3, 4, 5, 6, 7, 8 };
Assert.True(res.SequenceEqual(await c.ToArrayAsync()));

no longer works because it performs the implicit conversion of `res` from `int[]` to `ReadOnlySpan<int>` before executing the `await`.
The Ubuntu-24 agents dropped support for mono and MSBuild. Turns out these tests were relying on mono to test the .NET FX builds!

Also remove .NET Core 3.1 install step in build pipeline
@idg10 idg10 self-assigned this Jun 10, 2025
@idg10 idg10 merged commit de5749f into main Jun 10, 2025
6 checks passed
@idg10 idg10 deleted the feature/ix-fix-build branch June 10, 2025 08:08
idg10 added a commit that referenced this pull request Jun 10, 2025
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants