You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PR #1041 (security bump that aligned OpenTelemetry.Exporter.OpenTelemetryProtocol to 1.15.3), enabling CentralPackageTransitivePinningEnabled = true in Directory.Packages.props was tried as the cleanest way to ensure transitive package versions are pinned by Central Package Management (CPM). It was reverted because it surfaced pre-existing dependency conflicts that are out of scope for a security patch:
Microsoft.CodeAnalysis.Common — Marten/JasperFx pulls 5.0.0 transitively, while the Encina central version is pinned at 4.14.0. Direct conflict, NU1605 error.
Grpc.Tools — Aspire 13.2.2 pulls 2.78.0 transitively, while the Encina central version is pinned at 2.71.0. Direct conflict.
As a stopgap, Encina.OpenTelemetry.csproj and Encina.Testing.WireMock.csproj were given direct PackageReference entries with PrivateAssets="all" to pin the OTLP package without enabling CPM transitive pinning globally. After #1043 lands, Encina.OpenTelemetry legitimately consumes the OTLP package via its public API and drops PrivateAssets="all". Encina.Testing.WireMock keeps the workaround — the package is fixtures-only and doesn't consume OTLP at any API level; the reference exists purely to pin the version.
This SPIKE evaluates whether CentralPackageTransitivePinningEnabled can be enabled now that the dependency landscape may have shifted (newer Marten/JasperFx, Aspire updates, .NET 10 patch family alignment in #1041). If yes, retire the WireMock PrivateAssets="all" workaround.
Description: Set <CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled> in Directory.Packages.props. NuGet pins all transitive package versions to whatever is declared centrally; conflicts surface as restore errors.
Pros: Single source of truth for all package versions; zero stopgap workarounds; reproducible builds across all clones; security audits become straightforward.
Cons: Requires resolving the Marten/JasperFx and Aspire conflicts first. May require bumping Microsoft.CodeAnalysis.Common to 5.0.0 (which itself may cascade) and Grpc.Tools to 2.78.0+ (which Aspire requires anyway).
Description: Leave CentralPackageTransitivePinningEnabled off (current state). Add a permanent comment in Encina.Testing.WireMock.csproj explaining why PrivateAssets="all" is required for the OTLP reference.
Pros: Zero risk; no upstream coordination needed; minimal change.
Cons: Permanent workaround; future similar situations require new direct PrivateAssets="all" references in random packages; harder for new contributors to understand the dependency model.
Description: Use <CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled> only on the projects that need it (e.g., Encina.OpenTelemetry, Encina.Testing.WireMock). Leave it off globally.
Pros: Mitigates the OTLP transitive-pinning gap without forcing the Marten/Aspire conflicts to be resolved up front.
Cons: Inconsistent build configuration across the repo; the per-project flag is poorly documented and not idiomatic.
Effort: S — but adds maintenance burden.
Decision Criteria
Build reproducibility — does CPM transitive pinning eliminate "works on my machine" version drift?
Maintenance burden — how many PrivateAssets="all" workarounds exist today, and would Option A retire them all?
Security audit posture — does CPM transitive pinning make NuGet advisory triage easier?
Performance impact — N/A (CPM is build-time only)
Provider coverage — N/A (build infrastructure)
Scope
In Scope
Audit current state of transitive dependency conflicts: run dotnet restore --force-evaluate Encina.slnx with CentralPackageTransitivePinningEnabled = true and capture the full conflict list.
Context
In PR #1041 (security bump that aligned
OpenTelemetry.Exporter.OpenTelemetryProtocolto 1.15.3), enablingCentralPackageTransitivePinningEnabled = trueinDirectory.Packages.propswas tried as the cleanest way to ensure transitive package versions are pinned by Central Package Management (CPM). It was reverted because it surfaced pre-existing dependency conflicts that are out of scope for a security patch:Microsoft.CodeAnalysis.Common— Marten/JasperFx pulls5.0.0transitively, while the Encina central version is pinned at4.14.0. Direct conflict, NU1605 error.Grpc.Tools— Aspire 13.2.2 pulls2.78.0transitively, while the Encina central version is pinned at2.71.0. Direct conflict.As a stopgap,
Encina.OpenTelemetry.csprojandEncina.Testing.WireMock.csprojwere given directPackageReferenceentries withPrivateAssets="all"to pin the OTLP package without enabling CPM transitive pinning globally. After #1043 lands,Encina.OpenTelemetrylegitimately consumes the OTLP package via its public API and dropsPrivateAssets="all".Encina.Testing.WireMockkeeps the workaround — the package is fixtures-only and doesn't consume OTLP at any API level; the reference exists purely to pin the version.This SPIKE evaluates whether
CentralPackageTransitivePinningEnabledcan be enabled now that the dependency landscape may have shifted (newer Marten/JasperFx, Aspire updates, .NET 10 patch family alignment in #1041). If yes, retire the WireMockPrivateAssets="all"workaround.Options to Evaluate
Option A: Enable
CentralPackageTransitivePinningEnabled = trueglobally<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>inDirectory.Packages.props. NuGet pins all transitive package versions to whatever is declared centrally; conflicts surface as restore errors.Microsoft.CodeAnalysis.Commonto 5.0.0 (which itself may cascade) andGrpc.Toolsto 2.78.0+ (which Aspire requires anyway).Option B: Keep CPM transitive pinning disabled, document the WireMock workaround permanently
CentralPackageTransitivePinningEnabledoff (current state). Add a permanent comment inEncina.Testing.WireMock.csprojexplaining whyPrivateAssets="all"is required for the OTLP reference.PrivateAssets="all"references in random packages; harder for new contributors to understand the dependency model.Option C: Enable
CentralPackageTransitivePinningEnabledper-project (selective)<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>only on the projects that need it (e.g.,Encina.OpenTelemetry,Encina.Testing.WireMock). Leave it off globally.Decision Criteria
PrivateAssets="all"workarounds exist today, and would Option A retire them all?Scope
In Scope
dotnet restore --force-evaluate Encina.slnxwithCentralPackageTransitivePinningEnabled = trueand capture the full conflict list.docs/infrastructure/cpm-transitive-pinning.md(new file).Out of Scope
[INFRA]issue).Deliverables
docs/infrastructure/cpm-transitive-pinning.mdwith:[INFRA]follow-up issue with concrete plan to enable CPM transitive pinning + resolve conflictsEncina.Testing.WireMock.csprojTime Box
Estimated investigation time: 4-8 hours (one focused day, including documentation).
Related Issues
Encina.OpenTelemetry's direct OTLP reference)WithLoggingwiring (related v0.19.0 observability work)