diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index ed5ad05cec563..cecd0dccd6438 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -108,6 +108,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | [`dotnet` CLI commands log non-command-relevant data to stderr](sdk/10.0/dotnet-cli-stderr-output.md) | Behavioral change | RC 2 | | [.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 | +| [dnx.ps1 file is no longer included in .NET SDK](sdk/10.0/dnx-ps1-removed.md) | Source incompatible | GA | | [`dotnet new sln` defaults to SLNX file format](sdk/10.0/dotnet-new-sln-slnx-default.md) | Behavioral change | RC 1 | | [`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/sdk/10.0/dnx-ps1-removed.md b/docs/core/compatibility/sdk/10.0/dnx-ps1-removed.md new file mode 100644 index 0000000000000..11261bfe0aaab --- /dev/null +++ b/docs/core/compatibility/sdk/10.0/dnx-ps1-removed.md @@ -0,0 +1,39 @@ +--- +title: "Breaking change - dnx.ps1 file is no longer included in .NET SDK" +description: "Learn about the breaking change in .NET 10 where the dnx.ps1 script is no longer included in Windows versions of the .NET SDK." +ms.date: 10/13/2025 +ai-usage: ai-assisted +ms.custom: https://github.com/dotnet/docs/issues/497988 +--- + +# dnx.ps1 file is no longer included in .NET SDK + +The `dnx.ps1` shim script is no longer included in the .NET SDK. + +## Version introduced + +.NET 10 GA + +## Previous behavior + +Since .NET 10 Preview 7, on Windows versions of the .NET SDK, a `dnx.ps1` script was included in the dotnet root folder, alongside `dotnet.exe` and `dnx.cmd`. + +## New behavior + +The `dnx.ps1` script is no longer included. The `dnx.cmd` script remains available for executing tools. + +## Type of breaking change + +This change can affect source compatibility. + +## Reason for change + +The `dnx.ps1` script was added to avoid an extra `Terminate Batch Job` prompt when cancelling tools run via `dnx` with Ctrl+C. However, PowerShell has special handling for `--`, so if `--` was passed on the command line, it never made it through to `dnx`. This meant that in PowerShell, it was impossible to pass options to a tool using `dnx` if `dnx` itself has the same option. For example, `dnx dotnet-serve -- --help` showed the help for `dnx` instead of the help for `dotnet-serve`. + +## Recommended action + +In most cases, the `dnx.cmd` script is used instead so no action is necessary. If you were calling `dnx.ps1` directly, switch to `dnx.cmd`. + +## Affected APIs + +None. diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 80d7fdd46d7a0..b793dec8fb88f 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -118,6 +118,8 @@ items: href: sdk/10.0/dotnet-cli-stderr-output.md - name: .NET tool packaging creates RuntimeIdentifier-specific tool packages href: sdk/10.0/dotnet-tool-pack-publish.md + - name: dnx.ps1 file is no longer included in .NET SDK + href: sdk/10.0/dnx-ps1-removed.md - name: "`dotnet restore` audits transitive packages" href: sdk/10.0/nugetaudit-transitive-packages.md - name: project.json not supported in `dotnet restore`