From b4a2a2cda27e5fb46a29fddb28925c4fdccd1b3d Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Tue, 26 Aug 2025 15:50:47 -0500 Subject: [PATCH 1/6] update breaking change to be actually correct with respect to the input --- .../sdk/10.0/dotnet-tool-pack-publish.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md b/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md index 6263d81483d88..ab42a635117be 100644 --- a/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md +++ b/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md @@ -1,6 +1,6 @@ --- -title: "Breaking change: .NET tool packaging invokes Publish instead of Build" -description: "Learn about the breaking change in the .NET 10 SDK where .NET tool packaging changed from invoking Build to Publish, affecting included assets." +title: "Breaking change: .NET tool packaging may create RuntimeIdentifier-specific tool packages" +description: "Learn about the breaking change in the .NET 10 SDK where .NET tool packaging may use RuntimeIdentifiers to create platform-specific tools" ms.date: 08/11/2025 ai-usage: ai-assisted ms.custom: https://github.com/dotnet/docs/issues/47916 @@ -8,7 +8,8 @@ ms.custom: https://github.com/dotnet/docs/issues/47916 # .NET tool packaging invokes Publish instead of Build -The .NET tool packaging process changed from invoking the MSBuild `Build` target to the `Publish` target (logically, not precisely). This means that assets that are included in `Publish` but not in `Build`, like WebSDK StaticWebAssets, now appear in tool packages by default. If you explicitly copied those files into place, you might begin to receive build diagnostics warning of duplicate copies. +The .NET tool packaging process changed when `RuntimeIdentifiers` are present in the project. +Since the SDK now supports creating [platform-specific tools](https://github.com/dotnet/core/blob/main/release-notes/10.0/preview/preview6/sdk.md#platform-specific-net-tools), `RuntimeIdentifiers` are used to determine the set of platforms for which to create tool packages. ## Version introduced @@ -16,11 +17,11 @@ The .NET tool packaging process changed from invoking the MSBuild `Build` target ## Previous behavior -Previously when you ran `dotnet pack` on a project with `PackAsTool` set to `true`, it invoked the `Build` target, and only `Build`-created assets were included in the package. +Previously when you ran `dotnet pack` on a project with `PackAsTool` set to `true`, it ignored any `RuntimeIdentifiers`. ## New behavior -Starting in .NET 10, the tool packaging process invokes the `Publish` target, which means `Publish`-created assets are included in the package. This includes StaticWebAssets and minified and trimmed application assets. +Starting in .NET 10, `RuntimeIdentifiers` are used to determine the set of platforms for which to create tool packages. ## Type of breaking change @@ -36,7 +37,7 @@ This change enables the creation of optimized, platform-specific .NET Tool packa ## Recommended action -If your project is impacted, remove any explicit file copy customizations. +If you would like to create tools for only a subset of platforms, use `ToolPackageRuntimeIdentifiers`. If you would like to disable RID-specific tool packages entirely, you should conditionally include or exclude the `RuntimeIdentifiers` property in your project file. ## Affected APIs From a5649a585a91f29e80f7f9679c91e24699e582d4 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Tue, 26 Aug 2025 16:05:40 -0500 Subject: [PATCH 2/6] Apply suggestion from @gewarren Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md b/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md index ab42a635117be..ba59aabe0cfc6 100644 --- a/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md +++ b/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md @@ -1,6 +1,6 @@ --- -title: "Breaking change: .NET tool packaging may create RuntimeIdentifier-specific tool packages" -description: "Learn about the breaking change in the .NET 10 SDK where .NET tool packaging may use RuntimeIdentifiers to create platform-specific tools" +title: "Breaking change: .NET tool packaging might create RuntimeIdentifier-specific tool packages" +description: "Learn about the breaking change in the .NET 10 SDK where .NET tool packaging might use RuntimeIdentifiers to create platform-specific tools" ms.date: 08/11/2025 ai-usage: ai-assisted ms.custom: https://github.com/dotnet/docs/issues/47916 From 36615606ec89b3409aa6eb2231357eb03ce83db2 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Tue, 26 Aug 2025 16:06:11 -0500 Subject: [PATCH 3/6] Apply suggestion from @gewarren Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md b/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md index ba59aabe0cfc6..3d4d67c246e07 100644 --- a/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md +++ b/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md @@ -6,7 +6,7 @@ ai-usage: ai-assisted ms.custom: https://github.com/dotnet/docs/issues/47916 --- -# .NET tool packaging invokes Publish instead of Build +# .NET tool packaging creates RuntimeIdentifier-specific tool packages The .NET tool packaging process changed when `RuntimeIdentifiers` are present in the project. Since the SDK now supports creating [platform-specific tools](https://github.com/dotnet/core/blob/main/release-notes/10.0/preview/preview6/sdk.md#platform-specific-net-tools), `RuntimeIdentifiers` are used to determine the set of platforms for which to create tool packages. From dbee5d5b6dd4d326280b9b129cf3603843abbb67 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Tue, 26 Aug 2025 16:06:18 -0500 Subject: [PATCH 4/6] Apply suggestion from @gewarren Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md b/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md index 3d4d67c246e07..125a96666ad5d 100644 --- a/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md +++ b/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md @@ -8,7 +8,7 @@ ms.custom: https://github.com/dotnet/docs/issues/47916 # .NET tool packaging creates RuntimeIdentifier-specific tool packages -The .NET tool packaging process changed when `RuntimeIdentifiers` are present in the project. +The .NET tool packaging process has changed when `RuntimeIdentifiers` are present in the project. Since the SDK now supports creating [platform-specific tools](https://github.com/dotnet/core/blob/main/release-notes/10.0/preview/preview6/sdk.md#platform-specific-net-tools), `RuntimeIdentifiers` are used to determine the set of platforms for which to create tool packages. ## Version introduced From be15f1004a2263536d949e4c3f2ea948c2fc77d4 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Tue, 26 Aug 2025 16:06:27 -0500 Subject: [PATCH 5/6] Apply suggestion from @gewarren Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md b/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md index 125a96666ad5d..6db7eca562eca 100644 --- a/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md +++ b/docs/core/compatibility/sdk/10.0/dotnet-tool-pack-publish.md @@ -37,7 +37,7 @@ This change enables the creation of optimized, platform-specific .NET Tool packa ## Recommended action -If you would like to create tools for only a subset of platforms, use `ToolPackageRuntimeIdentifiers`. If you would like to disable RID-specific tool packages entirely, you should conditionally include or exclude the `RuntimeIdentifiers` property in your project file. +If you want to create tools for only a subset of platforms, use `ToolPackageRuntimeIdentifiers`. If you want to disable RID-specific tool packages entirely, you should conditionally include or exclude the `RuntimeIdentifiers` property in your project file. ## Affected APIs From 77e6d46398413e7ee8ada617dc3de2b6339dd3bc Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Tue, 26 Aug 2025 16:08:16 -0500 Subject: [PATCH 6/6] Update table of contents entries --- docs/core/compatibility/10.0.md | 2 +- docs/core/compatibility/toc.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index 414dd661513a5..4aeef9dd0abcf 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -103,7 +103,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | Title | Type of change | Introduced version | |-------|-------------------|--------------------| | [.NET CLI `--interactive` defaults to `true` in user scenarios](sdk/10.0/dotnet-cli-interactive.md) | Behavioral change | Preview 3 | -| [.NET tool packaging invokes Publish instead of Build](sdk/10.0/dotnet-tool-pack-publish.md) | Behavioral change | Preview 6 | +| [.NET tool packaging creates RuntimeIdentifier-specific tool packages](sdk/10.0/dotnet-tool-pack-publish.md) | Behavioral change | Preview 6 | | [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 | | [`dotnet package list` performs restore](sdk/10.0/dotnet-package-list-restore.md) | Behavioral change | Preview 4 | | [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 | diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 96ff8b33978a3..5e587e9139a61 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -110,7 +110,7 @@ items: items: - name: .NET CLI `--interactive` defaults to `true` in user scenarios href: sdk/10.0/dotnet-cli-interactive.md - - name: .NET tool packaging invokes Publish instead of Build + - name: .NET tool packaging creates RuntimeIdentifier-specific tool packages href: sdk/10.0/dotnet-tool-pack-publish.md - name: "`dotnet restore` audits transitive packages" href: sdk/10.0/nugetaudit-transitive-packages.md