[#25] Reactive: pair each target framework with its own Iceoryx2 build - #26
Open
patdhlk wants to merge 2 commits into
Open
[#25] Reactive: pair each target framework with its own Iceoryx2 build#26patdhlk wants to merge 2 commits into
patdhlk wants to merge 2 commits into
Conversation
…2 reference SetTargetFramework overrides MSBuild's nearest-TFM matching, so pinning TargetFramework=net8.0 on the Iceoryx2 ProjectReference made *every* target framework of Iceoryx2.Reactive compile against and copy the net8.0 build of Iceoryx2. Comparing build output on main: TFM Iceoryx2/bin Reactive/bin net8.0 67c296abd6c1 67c296abd6c1 net9.0 2dd619b2fa5c 67c296abd6c1 <- net8.0 net10.0 c92900c379e5 67c296abd6c1 <- net8.0 It stayed silent because net8.0 -> net9.0/net10.0 references unify forward. Two consequences: build.yml uploads src/Iceoryx2.Reactive/bin/Release/ wholesale, so the published artifact pairs mismatched assemblies; and Reactive only ever saw the net8.0 surface of Iceoryx2, so TFM-specific API divergence could not fail the build. Deleting the metadata restores nearest-TFM matching and pairs each target framework with its own Iceoryx2 build. Preferred over threading TargetFramework=$(TargetFramework) through, which would hard-fail if the two TFM lists ever diverge instead of degrading to nearest-match. The pin was not load-bearing for packaging: PrivateAssets/IncludeAssets/ ReferenceOutputAssembly are what turn the ProjectReference into a package dependency. dotnet pack still declares Iceoryx2 0.1.0 and System.Reactive 6.0.1 in all nuspec dependency groups, and lib/<tfm>/ still contains only Iceoryx2.Reactive.dll. Also unblocks eclipse-iceoryx#24 (.NET Standard 2.1 support): netstandard2.1 does not unify forward from net8.0, so the pin produced 7 x MSB3277 unresolvable assembly conflicts there. Verified that with this change eclipse-iceoryx#24 builds with 0 warnings and all four target frameworks paired.
elBoberido
approved these changes
Aug 4, 2026
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.
Notes for Reviewer
One line deleted, plus a comment recording why it must stay deleted, plus a CHANGELOG entry.
src/Iceoryx2.Reactive/Iceoryx2.Reactive.csprojpinned theIceoryx2ProjectReferencewith<SetTargetFramework>TargetFramework=net8.0</SetTargetFramework>. That overrides MSBuild'snearest-TFM matching, so every target framework of
Iceoryx2.Reactivecompiled against andcopied the net8.0 build of
Iceoryx2.This is a pre-existing bug on
main, not a regression from #24. Build output before/after,comparing the
Iceoryx2.dlleachIceoryx2.Reactivetarget framework emits against the matchingIceoryx2build (sha1, first 12 hex digits):Iceoryx2/bin/Release/<tfm>/67c296abd6c167c296abd6c1✅67c296abd6c1✅2dd619b2fa5c67c296abd6c1❌2dd619b2fa5c✅c92900c379e567c296abd6c1❌c92900c379e5✅It stayed silent because net8.0 → net9.0/net10.0 assembly references unify forward. Two things it
cost us:
build.ymluploadssrc/Iceoryx2.Reactive/bin/Release/wholesale, so thedotnet-buildartifact's
net9.0/andnet10.0/folders shipped a net8.0Iceoryx2.dllnext to anet9.0/net10.0
Iceoryx2.Reactive.dll.Iceoryx2.Reactiveonly ever saw the net8.0 surface ofIceoryx2, so target-framework-specificAPI divergence could not fail the build — it would have failed at runtime.
The NuGet packages were never affected:
lib/<tfm>/holds onlyIceoryx2.Reactive.dlland thenuspec declares
Iceoryx2as a package dependency per group, so a restored package always pairsmatching assemblies.
Why removal rather than
TargetFramework=$(TargetFramework)Pass-through hard-fails if the two projects' TFM lists ever diverge; nearest-match degrades
gracefully. I also confirmed the pin was not load-bearing for packaging —
PrivateAssets/IncludeAssets/ReferenceOutputAssemblyare what turn theProjectReferenceintoa package dependency, and pack output is unchanged (see below).
Verification
dotnet format --verify-no-changescleandotnet packunchanged:Iceoryx20.1.0 +System.Reactive6.0.1 in all three nuspecdependency groups,
lib/<tfm>/still contains onlyIceoryx2.Reactive.dllUnblocks #24
netstandard2.1 does not unify forward from net8.0, so on #24 (.NET Standard 2.1 / Unity
support) this pin produced 7 ×
MSB3277: Found conflicts between different versions of ... that could not be resolved(System.Runtime,System.Linq,System.Collections,System.Console,System.ComponentModel,System.Runtime.InteropServices,System.Threading.Thread). I appliedthis change on top of #24 at d42c827 and confirmed it builds with 0 warnings and all four
target frameworks paired — so #24 needs no workaround once this lands.
Not covered
No unit test. The defect lives in MSBuild reference resolution, so the only meaningful assertion is
"the
Iceoryx2.dllin each output directory matches that TFM's build", which needs a build-outputcheck rather than an xUnit test. If you'd like a guard against regression I can add one to
build.yml, but I'd rather do that as a follow-up than widen this PR — the in-file comment is thelightweight version.
Pre-Review Checklist for the PR Author
Convert to draft)csharp-iox2-123-short-description)csharp-iox2-25-reactive-tfm-pin[#123] Add feature description)### Bugfixes; no API breaking changesPR Reviewer Reminders
dotnet formathas been exectued before submittingReferences
Closes #25