Repository navigation
feat: multi-target remaining packages to net9.0/net10.0 - #69
Merged
Merged
Conversation
…e, Serialization, Observability to net9.0/net10.0 Default TFMs are now declared once in Directory.Packages.props (net8.0;net9.0;net10.0), imported after Directory.Build.props, so the 17 csproj without their own TargetFramework(s) inherit them; single-TFM projects (Samples.Core, Samples.Infrastructure) override with an explicit <TargetFramework>net8.0</TargetFramework>. Dependency fixes the new TFMs forced: Caching.Memory, Caching.Abstractions, System.Configuration.ConfigurationManager and System.Security.Cryptography.Pkcs move to per-TFM pins because Microsoft.Data.SqlClient 7.1.1 asks for 9.0.18 on net9.0 (its nuspec has no net10.0 group, so net10.0 falls back to net9.0's) and Caching.Memory 9.0.x requires Caching.Abstractions 9.0.x - NU1109 otherwise. Pkcs stays 8.0.2 on net8.0, keeping the CVE fix. Configuration.Binder moved for the same reason (OpenTelemetry -> Logging.Configuration -> Binder). OpenTelemetry core goes to 1.20.1 while Instrumentation.* stay at 1.20.0 (no 1.20.1 is published for them; pinning it fails NU1101). Core.Http and Core.Http.ProblemDetails drop their Microsoft.Extensions.Options / DependencyInjection.Abstractions PackageReferences: both assemblies ship in Microsoft.AspNetCore.App, so the SDK 10 PrunePackageReference feature raises NU1510 on net10.0 and strips those dependencies from the nuspec anyway - the frameworkReference travels with the package instead. TestServer tests now build on HostBuilder + ConfigureWebHost + host.GetTestServer(): WebHostBuilder and new TestServer(IWebHostBuilder) are ASPDEPR004/ASPDEPR008 on the ASP.NET Core 10 TestHost. Samples switch to ProjectReferences of src/Core.Observability and src/Core.Resilience, keeping Samples.Infrastructure -> Samples.Core. Minor version bumps for the new TFM assets (public API unchanged): CoreSystem.Http 1.2.0, Coresystem.Http.ProblemDetails 1.1.0, Coresystem.Observability 1.1.0, Coresystem.RateLimiting 1.3.0, Coresystem.Resilience 2.1.0, Coresystem.Serialization 1.3.0. Verified locally: build 0 warnings/0 errors, dotnet format clean, 624/624 tests, every nupkg carries lib/net8.0|net9.0|net10.0. Publishing still needs a tag per package.
Mark Correlation/Memory/Redis/Abstractions 1.1.0 as published (NuGet flat-container, not just tags), bump the central Abstractions pin to 1.1.0 now that it ships, and note that PR #69's six packages await their tags after merge.
… READMEs and docs Sweep every README and docs page against src/. All 10 packages multi-target net8.0/net9.0/net10.0 (PR #69), so the .NET 8-only claims, badges and the four csproj <Description> strings that ship in the nupkgs now say .NET 8, .NET 9 and .NET 10. Add CoreSystem.Correlation to the root package table, repo tree and roadmap. API-correctness fixes verified against source: docs/Serialization documented the internal ISerializerFactory and the internal Json/MessagePack/Protobuf serializer classes instead of the public IPayloadSerializer + SerializerType; docs/Resilience used a non-existent pipeline.AddRetry(...) (real API sets the Retry property) and invalid typeof<T>() (Handle takes Type[]); docs/Http/ProblemDetails showed AddCoreProblemDetails(mapper) and a non-existent app.UseCoreExceptionHandler() (real flow is AddCoreExceptionHandler<TMapper>() + ASP.NET Core's UseExceptionHandler()); Guides called AddCoreRateLimiting()/AddCoreResilience() without the required configure delegate and a non-existent AddCoreObservability(); docs/Guides/OpenTelemetry listed wrong meter names (Core.Resilience / Core.RateLimiting, and Core.Http has no meter); docs/Redis + src/Core.Redis README described the internal RedisConnectionFactory as reading a connection string from configuration (it applies hard-coded defaults and requires endpoints via the Create delegate); docs/index.md claimed a fallback strategy that does not exist. Remove a stray code fence in docs/Guides/Performance.md. Not changed: the OTLP badge stays v1.20.0 because OpenTelemetry.Instrumentation.* is still pinned at 1.20.0 (only the exporter core moved to 1.20.1).
…ucceeds Samples.Api was inheriting the centralized net8.0;net9.0;net10.0 TFMs, so the samples-smoke Dockerfile's 'dotnet publish' (no -f) failed with NETSDK1129: publish is not supported on a multi-targeted project without a target framework. Pinning <TargetFramework>net8.0</TargetFramework> matches Samples.Core and Samples.Infrastructure (already net8.0) and keeps the runtime image in the Dockerfile (aspnet:8.0) correct - a net9/net10 publish would not run on that image anyway. Verified: build 0/0, publish (no -f) exits 0, 624/624 tests, dotnet format clean.
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.
Summary
Multi-targets the six remaining src/ packages (plus their test projects) to
et8.0;net9.0;net10.0, completing the wave started with Correlation, Memory, Redis and Observability.Abstractions:
Public API unchanged; the bumps only ship the new TFM assets.
Central TFMs
Default TFMs are declared once in \Directory.Packages.props\ (<TargetFrameworks>net8.0;net9.0;net10.0\ + <TargetFramework />), which is imported after \Directory.Build.props\ and before each csproj, so the 17 csproj without their own \TargetFramework(s)\ inherit them. Single-TFM projects (\Samples.Core, \Samples.Infrastructure) override with an explicit <TargetFramework>net8.0.
Dependency fixes the new TFMs forced
NU1510: dropped redundant PackageReferences
\Core.Http\ and \Core.Http.ProblemDetails\ drop their \Microsoft.Extensions.Options\ / \DependencyInjection.Abstractions\ PackageReferences — both assemblies ship in \Microsoft.AspNetCore.App, so the SDK 10 \PrunePackageReference\ feature raises NU1510 on net10.0 and strips those dependencies from the nuspec anyway. The \rameworkReference\ travels with the package instead. Release note: both packages will stop declaring those two dependencies in their next version.
Test-host rewrites (ASPDEPR004/008)
TestServer tests now build on \HostBuilder\ + \ConfigureWebHost\ + \host.GetTestServer(); \WebHostBuilder\ and
ew TestServer(IWebHostBuilder)\ are deprecated on the ASP.NET Core 10 TestHost.
Samples
Samples switch to \ProjectReference\s of \src/Core.Observability\ and \src/Core.Resilience\ so they track local source instead of the published package. \Samples.Infrastructure\ keeps its \ProjectReference\ to \Samples.Core.
Verification
Publishing
Still needs a tag per package (<src folder>/v) after merge: \Core.Http/v1.2.0, \Core.Http.ProblemDetails/v1.1.0, \Core.Observability/v1.1.0, \Core.RateLimiting/v1.3.0, \Core.Resilience/v2.1.0, \Core.Serialization/v1.3.0.