From e68c3ac4a22201e9a53794a9a1ccc7692d3eba99 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Dec 2025 21:32:56 +0000 Subject: [PATCH 1/4] Initial plan From dda1aed163bf0d4778c5ecd5f90d2d7a38660e84 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Dec 2025 21:38:16 +0000 Subject: [PATCH 2/4] Add breaking change article for ToolCommandName property Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- docs/core/compatibility/10.0.md | 1 + .../sdk/10.0/toolcommandname-not-set.md | 54 +++++++++++++++++++ docs/core/compatibility/toc.yml | 4 ++ 3 files changed, 59 insertions(+) create mode 100644 docs/core/compatibility/sdk/10.0/toolcommandname-not-set.md diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index 994060f75659e..43a4eefd7f874 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -144,6 +144,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | [HTTP warnings promoted to errors in `dotnet package list` and `dotnet package search`](sdk/10.0/http-warnings-to-errors.md) | Behavioral/source incompatible change | | [NUGET_ENABLE_ENHANCED_HTTP_RETRY environment variable removed](sdk/10.0/nuget-enhanced-http-retry-removed.md) | Behavioral change | | [NuGet logs an error for invalid package IDs](sdk/10.0/nuget-packageid-validation.md) | Behavioral change | +| [ToolCommandName is not set for non tool packages](sdk/10.0/toolcommandname-not-set.md) | Source incompatible | ## Serialization diff --git a/docs/core/compatibility/sdk/10.0/toolcommandname-not-set.md b/docs/core/compatibility/sdk/10.0/toolcommandname-not-set.md new file mode 100644 index 0000000000000..cee49b988f25c --- /dev/null +++ b/docs/core/compatibility/sdk/10.0/toolcommandname-not-set.md @@ -0,0 +1,54 @@ +--- +title: "Breaking change - ToolCommandName is not set for non tool packages" +description: "Learn about the breaking change in .NET 10 where ToolCommandName is only set for projects with PackAsTool set to true." +ms.date: 12/02/2025 +ai-usage: ai-assisted +--- + +# ToolCommandName is not set for non tool packages + +The `ToolCommandName` property is no longer set automatically for all projects during build or package operations. It's now only set when `PackAsTool` is set to `true`, indicating that the project is a .NET tool package. + +## Version introduced + +.NET 10 RC 1 + +## Previous behavior + +Previously, the `ToolCommandName` property was always set during build or pack operations, regardless of whether the project was configured as a tool package. + +## New behavior + +Starting in .NET 10, the `ToolCommandName` property is only set when `PackAsTool` is set to `true`, indicating that the project is a .NET tool. + +## Type of breaking change + +This change can affect [source compatibility](../../categories.md#source-compatibility). + +## Reason for change + +The `ToolCommandName` property doesn't make sense for non-tool projects. Setting it for all projects was unnecessary and could cause confusion about the project's purpose. + +## Recommended action + +If your project relies on the `ToolCommandName` property being set, you have two options: + +- Set the property explicitly in your project file: + + ```xml + + your-command-name + + ``` + +- Convert your project to a .NET tool by setting `PackAsTool` to `true`: + + ```xml + + true + + ``` + +## Affected APIs + +None. diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 98e7aa1f57fe9..d7d11df48cd07 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -176,6 +176,10 @@ items: href: sdk/10.0/nu1015-packagereference-version.md - name: PrunePackageReference privatizes direct prunable references href: sdk/10.0/prune-packagereference-privateassets.md + - name: SHA-1 fingerprint support deprecated in dotnet nuget sign + href: sdk/10.0/dotnet-nuget-sign-sha1-deprecated.md + - name: ToolCommandName is not set for non tool packages + href: sdk/10.0/toolcommandname-not-set.md - name: Serialization items: - name: System.Text.Json checks for property name conflicts From d045173493c6c4a8a657e05879d0ab8817d6953d Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:06:36 -0800 Subject: [PATCH 3/4] Apply suggestions from code review --- docs/core/compatibility/10.0.md | 2 +- docs/core/compatibility/sdk/10.0/toolcommandname-not-set.md | 4 ++-- docs/core/compatibility/toc.yml | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index 43a4eefd7f874..a06f6f297186b 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -144,7 +144,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | [HTTP warnings promoted to errors in `dotnet package list` and `dotnet package search`](sdk/10.0/http-warnings-to-errors.md) | Behavioral/source incompatible change | | [NUGET_ENABLE_ENHANCED_HTTP_RETRY environment variable removed](sdk/10.0/nuget-enhanced-http-retry-removed.md) | Behavioral change | | [NuGet logs an error for invalid package IDs](sdk/10.0/nuget-packageid-validation.md) | Behavioral change | -| [ToolCommandName is not set for non tool packages](sdk/10.0/toolcommandname-not-set.md) | Source incompatible | +| [`ToolCommandName` not set for non-tool packages](sdk/10.0/toolcommandname-not-set.md) | Source incompatible | ## Serialization diff --git a/docs/core/compatibility/sdk/10.0/toolcommandname-not-set.md b/docs/core/compatibility/sdk/10.0/toolcommandname-not-set.md index cee49b988f25c..419aa14d446bc 100644 --- a/docs/core/compatibility/sdk/10.0/toolcommandname-not-set.md +++ b/docs/core/compatibility/sdk/10.0/toolcommandname-not-set.md @@ -5,13 +5,13 @@ ms.date: 12/02/2025 ai-usage: ai-assisted --- -# ToolCommandName is not set for non tool packages +# `ToolCommandName` not set for non-tool packages The `ToolCommandName` property is no longer set automatically for all projects during build or package operations. It's now only set when `PackAsTool` is set to `true`, indicating that the project is a .NET tool package. ## Version introduced -.NET 10 RC 1 +.NET 10 ## Previous behavior diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index d7d11df48cd07..1168bfe3312bd 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -176,9 +176,7 @@ items: href: sdk/10.0/nu1015-packagereference-version.md - name: PrunePackageReference privatizes direct prunable references href: sdk/10.0/prune-packagereference-privateassets.md - - name: SHA-1 fingerprint support deprecated in dotnet nuget sign - href: sdk/10.0/dotnet-nuget-sign-sha1-deprecated.md - - name: ToolCommandName is not set for non tool packages + - name: `ToolCommandName` not set for non-tool packages href: sdk/10.0/toolcommandname-not-set.md - name: Serialization items: From b4ff7557721f8e1d60a82f038d07a50bc85ae9c3 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Wed, 3 Dec 2025 11:34:27 -0800 Subject: [PATCH 4/4] Update docs/core/compatibility/toc.yml --- docs/core/compatibility/toc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 1168bfe3312bd..c83d1fb7215ff 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -176,7 +176,7 @@ items: href: sdk/10.0/nu1015-packagereference-version.md - name: PrunePackageReference privatizes direct prunable references href: sdk/10.0/prune-packagereference-privateassets.md - - name: `ToolCommandName` not set for non-tool packages + - name: "'ToolCommandName' not set for non-tool packages" href: sdk/10.0/toolcommandname-not-set.md - name: Serialization items: