Skip to content

Conversation

@WeihanLi
Copy link
Contributor

@WeihanLi WeihanLi commented Nov 17, 2025

This pull request updates the documentation for running file-based C# apps on Unix systems and revises the recommended version for the System.CommandLine NuGet package. The changes clarify how to resolve the dotnet executable path and ensure security by suggesting the latest stable package version.

Improvements to Unix execution instructions:

  • Updated the guidance for locating the dotnet executable: replaced the incorrect whence dotnet command with where dotnet, and added an alternative using the shebang #!/usr/bin/env dotnet for automatic PATH resolution.

Documentation update for package versioning:

  • Changed the recommended version of System.CommandLine from 2.0.0-beta6 to the stable 2.0.0, ensuring users are directed to use the latest secure release.

Internal previews

📄 File 🔗 Preview link
docs/csharp/fundamentals/tutorials/file-based-programs.md Tutorial: Build file-based C# programs

Copilot AI review requested due to automatic review settings November 17, 2025 08:20
@WeihanLi WeihanLi requested review from a team and BillWagner as code owners November 17, 2025 08:20
@dotnetrepoman dotnetrepoman bot added this to the November 2025 milestone Nov 17, 2025
@dotnet-policy-service dotnet-policy-service bot added dotnet-csharp/svc fundamentals/subsvc community-contribution Indicates PR is created by someone from the .NET community. labels Nov 17, 2025
@WeihanLi WeihanLi changed the title Update System.CommandLine version and mention env dotnet shebang config file-based program document enhancement Nov 17, 2025
Copilot finished reviewing on behalf of WeihanLi November 17, 2025 08:23
Copy link
Contributor

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 updates the System.CommandLine package version reference and adds documentation for using the env command in shebang configuration for Unix-based systems.

  • Updates System.CommandLine version from 2.0.0-beta6 to 2.0.0
  • Adds documentation for using #!/usr/bin/env dotnet as an alternative shebang configuration
  • Changes the Unix command reference from whence dotnet to where dotnet

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

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

Thanks @WeihanLi

I'll :shipit: now.

@BillWagner BillWagner enabled auto-merge (squash) November 17, 2025 15:53
@BillWagner BillWagner merged commit fd29c25 into dotnet:main Nov 17, 2025
9 checks passed
@WeihanLi WeihanLi deleted the file-based-programs-doc branch November 18, 2025 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-csharp/svc fundamentals/subsvc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants