Repository navigation
Multi-target net8.0 alongside net10.0 - #11
Merged
Merged
Conversation
All ten published packages targeted net10.0 only, so a .NET 8 LTS application could not install any of them. Add net8.0 to the target framework matrix. - 10 packable projects: TargetFramework -> TargetFrameworks net8.0;net10.0 - 10 unit test projects: same, so the shipped net8.0 binaries are actually executed rather than only compiled - build.yml and publish-nuget.yml: install the 8.0.x SDK as well, since the .NET 10 SDK carries no .NET 8 runtime and net8.0 tests would otherwise fail to launch - README files: state the supported frameworks; each adapter package packs its own README, so all ten needed the correction MessageValidation.IntegrationTests and the example project stay on net10.0 -- neither is published, and doubling the container-backed tests buys nothing. Microsoft.Extensions.* stays at 10.0.5 for both targets; those packages are net8.0-compatible. Conditioning the version per target framework is left for the Directory.Build.props work in #8. Verified: Release build clean on both targets, all 10 unit test projects pass under net8.0 and net10.0, and every .nupkg contains lib/net8.0 and lib/net10.0 with matching nuspec dependency groups. Closes #5 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reuse the solution-level pack command from the publish workflow so all current and future packable projects are validated. This includes the previously omitted MessageValidation.ImmediateValidations package. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #5.
All ten published packages targeted
net10.0only, so a .NET 8 LTS application could not install any of them —dotnet add package MessageValidationfailed outright rather than degrading. This addsnet8.0to the target framework matrix.Changes
Ten packable projects —
TargetFramework→TargetFrameworks:Ten unit test projects — same change, so the shipped
net8.0binaries are actually executed rather than merely compiled.Both workflows —
setup-dotnetnow installs8.0.xas well:The .NET 10 SDK does not carry the .NET 8 runtime, so without this the
net8.0test run fails with "framework 'Microsoft.NETCore.App' version '8.0.0' was not found". It is applied topublish-nuget.ymltoo, so a release-time build can never depend on automatic targeting-pack download.Ten README files — the
## Requirementsline now reads- .NET 8.0+ (targets `net8.0` and `net10.0`). Each adapter package packs its own README (<None Include="README.md" Pack="true" />), so all ten were stale on NuGet.org, not just the root one.Deliberately unchanged
MessageValidation.IntegrationTestsandExample.ImmediateValidationstaynet10.0— neither is published, and doubling six container-backed tests buys nothing.Microsoft.Extensions.*stays at10.0.5for both targets. Those packages arenet8.0-compatible, so a .NET 8 app resolves them fine; the cost is that they get pulled up from the shared framework's8.0.x. Conditioning the version per target framework is deferred to Centralize package metadata and dependency versions with Directory.Build.props and Directory.Packages.props #8, whereDirectory.Build.propsmakes it a few lines rather than a block in every project.<Version>stays2.1.0. Adding a target framework is not breaking, but picking the release version is the maintainer's call.LangVersionstays14.0— language version is independent of target framework.Verification
0 Error(s). Warning count doubles exactly (every warning code has an even count), confirming these are the pre-existing XML-doc/analyzer warnings emitted once per target framework — none isnet8.0-specific.net8.0andnet10.0. Core project: 40/40 on each..nupkgfiles contain bothlib/net8.0/andlib/net10.0/, with matchingnet8.0andnet10.0.nuspecdependency groups..nupkg.Note on .NET 8 lifecycle
.NET 8 LTS support ends November 2026. This is a bridge for the installed base that has not yet migrated, not a permanent commitment — dropping
net8.0when it goes out of support is a reasonable follow-up for the next major version.