Repository navigation
Pack RID-specific tool pointer packages with DotnetToolSettings.xml under tools/any/any - #55107
Merged
Merged
Conversation
Co-authored-by: baronfel <[email protected]>
Co-authored-by: baronfel <[email protected]>
Copilot
AI
changed the title
[WIP] Update pointer package to use any TFM for compatibility
Pack RID-specific tool pointer packages with DotnetToolSettings.xml under tools/any/any
Jul 1, 2026
baronfel
reviewed
Jul 1, 2026
Co-authored-by: baronfel <[email protected]>
Member
|
When we merge this we should backport to 10.0.4xx as well. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the RID-specific pointer tool package layout so that DotnetToolSettings.xml is emitted under tools/any/any/, keeping the pointer package TFM-agnostic while still referencing RID-specific implementation packages.
Changes:
- Adjust
Microsoft.NET.PackTool.targetsto place the pointer package’sDotnetToolSettings.xmlundertools/any/any/(while keeping implementation packages’ existing TFM/RID layout). - Extend end-to-end tool packaging assertions to validate the pointer package contains exactly one
DotnetToolSettings.xmland that it lives attools/any/any/DotnetToolSettings.xml.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/Microsoft.DotNet.PackageInstall.Tests/EndToEndToolTests.cs | Adds assertions to verify the pointer package has a single DotnetToolSettings.xml at tools/any/any/. |
| src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.PackTool.targets | Updates packing logic to emit DotnetToolSettings.xml to a TFM-agnostic tools/any/any/ path for RID-specific pointer packages. |
dsplaisted
approved these changes
Jul 2, 2026
Member
|
/backport to release/10.0.4xx |
Contributor
|
Started backporting to |
Contributor
|
@baronfel backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Creating an empty commit: Initial plan
Applying: Use any TFM for pointer tool settings
Using index info to reconstruct a base tree...
M src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.PackTool.targets
M test/Microsoft.DotNet.PackageInstall.Tests/EndToEndToolTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.PackTool.targets
Auto-merging test/Microsoft.DotNet.PackageInstall.Tests/EndToEndToolTests.cs
CONFLICT (content): Merge conflict in test/Microsoft.DotNet.PackageInstall.Tests/EndToEndToolTests.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Use any TFM for pointer tool settings
Error: The process '/usr/bin/git' failed with exit code 128 |
|
@copilot, 👍 Multi-TFM builds produce errors now: |
MaceWindu
added a commit
to linq2db/linq2db
that referenced
this pull request
Aug 12, 2026
The build CI job has failed on every PR since 2026-08-11 (first red run 22738, last green 22735) with two NU5118 errors on LinqToDB.CLI during dotnet pack linq2db.slnx. The trigger is the hosted agent's SDK rolling from 10.0.302 to 10.0.400, not any repo change: build-job.yml requests bare 10.x and global.json allows minor roll-forward. dotnet/sdk#55107 moved the RID pointer package's DotnetToolSettings.xml to a TFM-agnostic tools/any/any/ path, but PackTool runs once per TFM. With TargetFrameworks net8.0, net9.0 and net10.0, all three passes emit that same package path, so NuGet reports a collision that TreatWarningsAsErrors turns fatal. The upstream test asserts the pointer package holds exactly one settings file, which only holds for single-TFM tools. The three generated files are byte-identical (matching SHA-256): the pointer settings carry only ToolCommandName plus the per-RID sub-package ids, nothing TFM-specific. NuGet keeping the first and skipping the duplicates is therefore lossless, and NoWarn yields exactly the single-settings-file layout the new SDK intends. Scoped to the pointer package so the seven per-RID packs keep NU5118 enforcement. Verified locally on SDK 10.0.400: full pack exits 0 with no warnings, the pointer package holds exactly one tools/any/any/DotnetToolSettings.xml listing all seven RIDs with packageType DotnetTool, each RID sub-package retains its per-TFM tools/net8.0, net9.0 and net10.0 layout, and verify-nuget-sizes.ps1 passes 8 of 8. Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
1 of 3 tasks
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.
RID-specific tool packaging currently places the top-level pointer package's
DotnetToolSettings.xmlunder a concrete TFM path. This change makes the pointer package emit the settings file undertools/any/anyso the package remains TFM-agnostic while still pointing to the RID-specific payload packages.Packaging layout
Microsoft.NET.PackTool.targetsso the top-level RID-specific pointer package writesDotnetToolSettings.xmltotools/any/any/.Pointer package behavior
anyTFM path only when packing the RID-specific top-level package that contains metadata but no implementation files.Coverage
DotnetToolSettings.xmland that its path istools/any/any/DotnetToolSettings.xml.anyRID payload.