Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 13, 2025

  • Create breaking change document for dnx.ps1 removal in SDK
  • Add entry to toc.yml for SDK breaking changes
  • Add entry to 10.0.md index file
  • Verify document follows breaking change guidelines
  • Update link format to use anchor tag
  • Reorder entry in 10.0.md to correct position
Original prompt

This section details on the original issue you should resolve

<issue_title>[Breaking change]: dnx.ps1 file is no longer included in .NET SDK</issue_title>
<issue_description>### Description

The dnx.ps1 shim script is no longer included in the .NET SDK.

Version

.NET 10

Previous behavior

Since .NET 10 Preview 7, in 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.

Type of breaking change

  • Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
  • Behavioral change: Existing binaries might behave differently at run time.

Reason for change

We added the dnx.ps1 script to avoid an extra Terminate Bach 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 would never make it through to dnx. This meant from 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 would show the help for dnx instead of the help for dotnet-serve.

Recommended action

In most cases, the dnx.cmd script will be used instead so no action is necessary. If you were calling dnx.ps1 directly, you will need to switch to dnx.cmd.

Feature area

SDK

Affected APIs

No response


Associated WorkItem - 497988</issue_description>

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

@gewarren @dsplaisted Should the Version should be .NET 10 GA and not .NET 8? @dsplaisted Yes, definitely this should be .NET 10.

Fixes #49044


✨ 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/10.0.md Breaking changes in .NET 10
docs/core/compatibility/sdk/10.0/dnx-ps1-removed.md dnx.ps1 file is no longer included in .NET SDK
docs/core/compatibility/toc.yml docs/core/compatibility/toc

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Remove dnx.ps1 script from .NET SDK Document breaking change: dnx.ps1 file removal from .NET SDK Oct 13, 2025
@Copilot Copilot AI requested a review from gewarren October 13, 2025 19:57
Copilot finished work on behalf of gewarren October 13, 2025 19:57
@gewarren gewarren marked this pull request as ready for review October 14, 2025 00:41
@gewarren gewarren requested a review from a team as a code owner October 14, 2025 00:41
@Copilot Copilot AI review requested due to automatic review settings October 14, 2025 00:41
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 breaking change for the removal of the dnx.ps1 script from the .NET SDK starting in .NET 10 GA. The change addresses a PowerShell argument passing issue where the -- operator prevented proper tool argument forwarding.

  • Creates comprehensive breaking change documentation explaining the removal and its rationale
  • Updates the table of contents and index to include the new breaking change entry
  • Provides migration guidance for users to switch from dnx.ps1 to dnx.cmd

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
docs/core/compatibility/sdk/10.0/dnx-ps1-removed.md New breaking change document detailing the dnx.ps1 removal with context and migration steps
docs/core/compatibility/toc.yml Adds the new breaking change to the SDK section navigation
docs/core/compatibility/10.0.md Includes the breaking change in the .NET 10 compatibility index table

| [`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 |
| [`dotnet tool install --local` creates manifest by default](sdk/10.0/dotnet-tool-install-local-manifest.md) | Behavioral change | Preview 7 |
| [dnx.ps1 file is no longer included in .NET SDK](sdk/10.0/dnx-ps1-removed.md) | Source incompatible | GA |
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot please move this to line 111.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved entry to line 111 in commit ca28949.

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
@Copilot Copilot AI requested a review from gewarren October 14, 2025 02:02
Copilot finished work on behalf of gewarren October 14, 2025 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Breaking change]: dnx.ps1 file is no longer included in .NET SDK

2 participants