Repository navigation
[release/10.0.4xx] Pack RID-specific tool pointer packages with DotnetToolSettings.xml under tools/any/any - #55142
Merged
Conversation
…nder tools/any/any (#55107) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: baronfel <[email protected]> (cherry picked from commit f64ec67)
Contributor
There was a problem hiding this comment.
Pull request overview
Updates RID-specific .NET tool packaging so the top-level “pointer” package remains TFM-agnostic by emitting DotnetToolSettings.xml under tools/any/any/, while keeping RID/TMF-specific implementation package layouts unchanged.
Changes:
- Adjust
Microsoft.NET.PackTool.targetsto place the pointer package’sDotnetToolSettings.xmlundertools/any/any/(only for RID-specific top-level packages without implementation). - Update end-to-end tool packaging assertions to ensure exactly one
DotnetToolSettings.xmlexists and that its path istools/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 helper/assertions to validate the settings file is unique and located at tools/any/any/DotnetToolSettings.xml in the pointer package. |
| src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.PackTool.targets | Changes packing logic so the RID-specific pointer package writes DotnetToolSettings.xml to a TFM-agnostic path (tools/any/any/). |
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
Contributor
I checked mergeability against |
dsplaisted
approved these changes
Jul 6, 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.
Backport of #55107 to
release/10.0.4xx.Why this is needed
When packing a RID-specific .NET tool, the SDK produces a top-level "pointer" package plus one implementation package per RID. The pointer package is metadata-only: it declares the available RIDs and points consumers at the correct RID-specific implementation package to download. It contains no tool binaries.
Previously the SDK wrote the pointer package's
DotnetToolSettings.xmlunder a concrete TFM/RID path (e.g.tools/net11.0/<rid>/). That coupled the TFM-agnostic pointer to a specific target framework path, which is inconsistent with the pointer's role and can lead to the settings file not being discovered as expected for the pointer package. The pointer should be TFM- and RID-agnostic, since it exists only to route consumers to the real payload packages.What changed
Packaging layout (
Microsoft.NET.PackTool.targets)DotnetToolSettings.xmltotools/any/any/, keeping the pointer TFM- and RID-agnostic.tools/net11.0/linux-x64/...).Pointer package behavior
any/anypath is applied only when packing the RID-specific top-level package that contains metadata but no implementation files.Coverage (
EndToEndToolTests.cs)DotnetToolSettings.xmland that its path istools/any/any/DotnetToolSettings.xml.anyRID payload.Backport notes
Cherry-picked from squash merge commit
f64ec67374cd10769878f458fb1825e4b36999a1. TheEndToEndToolTests.cschange had a conflict because theNet99Tool-related tests do not exist onrelease/10.0.4xx; only the relevant additions from the original PR were carried over (theGetToolSettingsFileEntryandEnsureToolSettingsFileUsesAnyTfmAndRidhelpers, their call sites, and theGetToolSettingsFilerefactor). TheMicrosoft.NET.PackTool.targetschange applied cleanly.