Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 16, 2025

This PR adds documentation for a workaround that allows users to maintain the old behavior (framework-dependent, platform-agnostic .NET Tools) when they have a RuntimeIdentifier specified in their project file.

Context

In .NET 10, the tool packaging process changed to use RuntimeIdentifiers to create platform-specific tool packages. While this enables optimized scenarios like self-contained and trimmed tools, some users need to maintain the previous behavior where tools were framework-dependent and platform-agnostic.

Changes

Added a workaround to the "Recommended action" section of the breaking change article that explains users can opt out of the new behavior by setting two properties in their project file:

<PropertyGroup>
  <CreateRidSpecificToolPackages>false</CreateRidSpecificToolPackages>
  <UseAppHost>false</UseAppHost>
</PropertyGroup>

This workaround was introduced in dotnet/sdk#51281 and requires the .NET 10.0.100 GA SDK or later.

Fixes #47916

Original prompt

This section details on the original issue you should resolve

<issue_title>Add new workaround for RID-specific tool publishing</issue_title>
<issue_description>### Type of issue

Typo

Description

In dotnet/sdk#51281 we added a way for users that were making .NET Tools that had a RuntimeIdentifier specified to get the same behavior they had on .NET 9 and below - that is, making framework-dependent, platform-agnostic .NET Tools.

To do so, the following project properties need to be added, and the 10.0.100 GA release of the .NET SDK must be used.

    <CreateRidSpecificToolPackages>false</CreateRidSpecificToolPackages>
    <UseAppHost>false</UseAppHost>

[Enter feedback here]

Page URL

https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/10.0/dotnet-tool-pack-publish

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md

Document Version Independent Id

8eb98a02-7d87-9fd4-0429-c5f059e8f27b

Platform Id

32c3d15f-5b4b-a175-e761-6d7b0754db1a

Article author

@gewarren

Metadata

  • ID: 62f68c53-02c5-451d-fc2c-453fcef7aa87
  • PlatformId: 32c3d15f-5b4b-a175-e761-6d7b0754db1a
  • Service: dotnet-fundamentals

Related Issues</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #49289


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Internal previews

📄 File 🔗 Preview link
docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md .NET tool packaging creates RuntimeIdentifier-specific tool packages

@Copilot Copilot AI changed the title [WIP] Add new workaround for RID-specific tool publishing Add workaround for RID-specific tool publishing Oct 17, 2025
@Copilot Copilot AI requested a review from gewarren October 17, 2025 00:02
Copilot finished work on behalf of gewarren October 17, 2025 00:02
@gewarren gewarren marked this pull request as ready for review October 17, 2025 00:57
@gewarren gewarren requested a review from a team as a code owner October 17, 2025 00:57
@Copilot Copilot AI review requested due to automatic review settings October 17, 2025 00:57
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR documents a workaround that allows developers to opt out of the new .NET 10 RID-specific tool packaging behavior and maintain framework-dependent, platform-agnostic tools when a RuntimeIdentifier is specified.

Key Changes:

  • Added documentation for two MSBuild properties (CreateRidSpecificToolPackages and UseAppHost) that restore pre-.NET 10 tool packaging behavior
  • Provides an alternative solution for users who need the old behavior despite having a RuntimeIdentifier in their project

@gewarren gewarren requested a review from baronfel October 17, 2025 00:58
@gewarren
Copy link
Contributor

@baronfel I guess we should wait until GA to merge this?

@baronfel
Copy link
Member

@gewarren if possible that would be great - though I know it can be annoying to babysit a stack of PRs for an extended period of time.

@gewarren gewarren added the 🚧 Hold for related PR Indicates a PR can only be merged when other related PRs are merged (see comments for links) label Oct 17, 2025
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚧 Hold for related PR Indicates a PR can only be merged when other related PRs are merged (see comments for links) dotnet-fundamentals/svc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add new workaround for RID-specific tool publishing [Breaking change]: .NET Tool packaging now invokes Publish instead of Build

4 participants