Skip to content

Commit 54cefea

Browse files
authored
Document breaking change: dnx.ps1 file removal from .NET SDK (#49122)
1 parent ae503d8 commit 54cefea

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

docs/core/compatibility/10.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
111111
| [`dotnet` CLI commands log non-command-relevant data to stderr](sdk/10.0/dotnet-cli-stderr-output.md) | Behavioral change | RC 2 |
112112
| [.NET tool packaging creates RuntimeIdentifier-specific tool packages](sdk/10.0/dotnet-tool-pack-publish.md) | Behavioral change | Preview 6 |
113113
| [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 |
114+
| [dnx.ps1 file is no longer included in .NET SDK](sdk/10.0/dnx-ps1-removed.md) | Source incompatible | GA |
114115
| [`dotnet new sln` defaults to SLNX file format](sdk/10.0/dotnet-new-sln-slnx-default.md) | Behavioral change | RC 1 |
115116
| [`dotnet package list` performs restore](sdk/10.0/dotnet-package-list-restore.md) | Behavioral change | Preview 4 |
116117
| [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 |
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "Breaking change - dnx.ps1 file is no longer included in .NET SDK"
3+
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."
4+
ms.date: 10/13/2025
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/dotnet/docs/issues/497988
7+
---
8+
9+
# dnx.ps1 file is no longer included in .NET SDK
10+
11+
The `dnx.ps1` shim script is no longer included in the .NET SDK.
12+
13+
## Version introduced
14+
15+
.NET 10 GA
16+
17+
## Previous behavior
18+
19+
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`.
20+
21+
## New behavior
22+
23+
The `dnx.ps1` script is no longer included. The `dnx.cmd` script remains available for executing tools.
24+
25+
## Type of breaking change
26+
27+
This change can affect <a>source compatibility</a>.
28+
29+
## Reason for change
30+
31+
The `dnx.ps1` script was added to avoid an extra `Terminate Batch Job` prompt when cancelling tools run via `dnx` with <kbd>Ctrl+C</kbd>. 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`.
32+
33+
## Recommended action
34+
35+
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`.
36+
37+
## Affected APIs
38+
39+
None.

docs/core/compatibility/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ items:
126126
href: sdk/10.0/dotnet-cli-stderr-output.md
127127
- name: .NET tool packaging creates RuntimeIdentifier-specific tool packages
128128
href: sdk/10.0/dotnet-tool-pack-publish.md
129+
- name: dnx.ps1 file is no longer included in .NET SDK
130+
href: sdk/10.0/dnx-ps1-removed.md
129131
- name: "`dotnet restore` audits transitive packages"
130132
href: sdk/10.0/nugetaudit-transitive-packages.md
131133
- name: project.json not supported in `dotnet restore`

0 commit comments

Comments
 (0)