Skip to content

feat!: drop net8.0 and netstandard2.0, target net10.0 - #47

Draft
Poltuu wants to merge 2 commits into
masterfrom
chore/net10
Draft

Poltuu wants to merge 2 commits into
masterfrom
chore/net10

Conversation

@Poltuu

@Poltuu Poltuu commented Oct 5, 2026 •

Copy link
Copy Markdown

Problem

MerQure was on the net8 list, but only for its edges: the two samples and the two test projects. The three published libraries were netstandard2.0 only.

Fix

Samples and tests target net10.0, global.json pins 10.0.100, the workflow asks for the 10.0.x SDK. Their Microsoft.Extensions.* references go from 6.0.x to 10.0.12, and the test stack to Test.Sdk 18.10.1, xunit 2.9.3, runner 4.0.0, coverlet 10.1.0.

What the test bump found

The repo sets treatwarningsaserrors, so the newer xunit analyzers turned sixteen xUnit2021 findings into build errors: Assert.ThrowsAsync calls whose returned task was discarded. Every one of them asserted nothing at all, in MessagingServiceTests, RetryBusServiceTests and PublisherTests. They are now awaited and their methods return Task.

Awaiting them made one fail for real:

Publisher_Publish_ShouldThrow_WhenPublishFailed sets up PublishWithAcknowledgementAsync but never tells it to throw, so TryPublishWithBrokerAcknowledgementAsync has nothing to catch and no MerqureToolsException can come out. Its sibling Publisher_PublishWithTransaction_ShouldThrow_WhenPublishFailed, two methods down, does it right with .Throws<Exception>(). The missing call is added, and the test now exercises the path it was named for.

Tests

Clean build, 34 tests pass. They were 34 before too, but twelve of them were asserting nothing.

The libraries drop netstandard2.0, and that is a major

MerQure, MerQure.RbMQ and MerQure.Tools target net10.0 only. GitVersion.yml gets next-version: 3.0.0 so the next release says so; nuget.org is currently serving 2.0.1.

This breaks any consumer not on net10. Every Lucca consumer is already there (Figgo, Figgo.Services, figgo-sync, ilucca), and the call was made deliberately rather than by multi targeting.

What netstandard2.0 was costing, and no longer does:

Before After
Microsoft.Bcl.AsyncInterfaces, a polyfill for IAsyncDisposable and IAsyncEnumerable, in the box since netcoreapp3.0 reference gone
Microsoft.Extensions.Configuration and .Options 2.1.1, from 2018, inherited as a floor by every consumer 10.0.12

Packed locally to check: the three .nupkg carry lib/net10.0 only, MerQure.RbMQ now declares Microsoft.Extensions.* 10.0.12, and the inter-package dependency reads MerQure 3.0.0.

Two things the pack found

  • The package icon was declared as <None Include="D:�\MerQure\MerQure\MerQure-logo.png" />, the workspace path of a GitHub Actions Windows runner, so dotnet pack failed anywhere else, including locally. It now resolves through $(MSBuildThisFileDirectory).
  • VersionPrefix and PackageVersion said 0.0.7 while nuget.org serves 2.0.1. The CI pack passes -p:PackageVersion from GitVersion so it never mattered there, but a local pack produced a 0.0.7. Both now read 3.0.0.

🤖 Generated with Claude Code

The three published libraries are netstandard2.0 and do not move. Only
the two samples and the two test projects targeted net8.0; they now
target net10.0. global.json pins 10.0.100 and the workflow asks for the
10.0.x SDK.

The Microsoft.Extensions packages in the samples and tests go from 6.0.x
to 10.0.12, and the test stack to Test.Sdk 18.10.1, xunit 2.9.3, runner
4.0.0 and coverlet 10.1.0.

That test bump turns xUnit2021 into an error here, because the repo
treats warnings as errors, and it found sixteen calls to
Assert.ThrowsAsync whose task was discarded. None of them asserted
anything. They are now awaited, and their test methods return Task.

One of the sixteen then failed for real:
Publisher_Publish_ShouldThrow_WhenPublishFailed never set up its mock to
throw, so no MerqureToolsException could ever come out. Its sibling two
methods down does it right. The missing Throws<Exception>() is added.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Poltuu Poltuu changed the title chore: drop net8.0 from the samples and tests chore: drop net8.0 and add a net10.0 target to the libraries Oct 5, 2026
MerQure, MerQure.RbMQ and MerQure.Tools target net10.0. This is a
breaking change for any consumer not on net10, hence the 3.0.0 floor in
GitVersion.yml. Every Lucca consumer is already there: Figgo,
Figgo.Services, figgo-sync and ilucca.

netstandard2.0 was costing the packages two things that now go away.
Microsoft.Bcl.AsyncInterfaces, a polyfill for IAsyncDisposable and
IAsyncEnumerable which have been in the box since netcoreapp3.0, is
gone. Microsoft.Extensions.Configuration and .Options move from 2.1.1,
released in 2018 and inherited as a floor by every consumer, to 10.0.12.

The package icon was declared as D:\a\MerQure\MerQure\MerQure-logo.png,
the workspace path of a GitHub Actions Windows runner, so dotnet pack
failed anywhere else. It now resolves from the props file's own folder.
VersionPrefix said 0.0.7 while nuget.org was serving 2.0.1; the CI pack
overrides it, but it is now 3.0.0 so a local pack says the truth too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Poltuu Poltuu changed the title chore: drop net8.0 and add a net10.0 target to the libraries feat!: drop net8.0 and netstandard2.0, target net10.0 Oct 5, 2026
@Poltuu Poltuu added the 💥 Breaking change Introduces a breaking change label Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💥 Breaking change Introduces a breaking change 🔨 Technical

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant