Skip to content

Conversation

meaghanlewis
Copy link
Contributor

@meaghanlewis meaghanlewis commented Sep 24, 2025

Summary

This pull request updates documentation for several .NET CLI commands to support file-based C# apps, and aligns the minimum supported SDK version to .NET 6 across the board. The changes clarify usage and arguments for dotnet build, dotnet clean, dotnet publish, dotnet restore, and dotnet run, and provide new examples for file-based workflows.

Support for file-based C# programs:

  • Added support and documentation for using single C# files (<FILE>) as arguments to dotnet build, dotnet clean, dotnet publish, and dotnet restore. This includes updates to synopsis, argument descriptions, and new usage examples. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

  • For dotnet run, introduced the --file option and updated documentation to describe running file-based apps, including new argument and usage examples. [1] [2] [3] [4]

Minimum supported SDK version updates:

  • Changed the minimum supported SDK version from ".NET Core 3.1 SDK and later" to ".NET 6 and later" in all affected command documentation. [1] [2] [3] [4] [5]

General documentation improvements:

  • Updated argument descriptions and usage examples to clarify the behavior when no file is specified, and to better explain the differences between project, solution, and file-based workflows. [1] [2] [3] [4]

  • Refreshed dates in front-matter metadata to reflect the latest documentation update. [1] [2] [3] [4] [5]

Fixes #47465


Internal previews

📄 File 🔗 Preview link
docs/core/tools/dotnet-build.md dotnet build
docs/core/tools/dotnet-clean.md dotnet clean command
docs/core/tools/dotnet-publish.md dotnet publish
docs/core/tools/dotnet-restore.md docs/core/tools/dotnet-restore
docs/core/tools/dotnet-run.md dotnet run

@meaghanlewis meaghanlewis changed the title Update file-based app commands Update file-based program commands Sep 24, 2025
@meaghanlewis meaghanlewis marked this pull request as ready for review September 24, 2025 21:39
@meaghanlewis meaghanlewis requested review from adegeo and a team as code owners September 24, 2025 21:39
@meaghanlewis meaghanlewis changed the title Update file-based program commands Update file-based program functionality in command reference Sep 24, 2025
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.

This looks great to me @meaghanlewis

I had a few comments, most are optional.

@meaghanlewis meaghanlewis changed the title Update file-based program functionality in command reference Update file-based app functionality in command reference Sep 25, 2025
Copy link
Contributor

@adegeo adegeo left a comment

Choose a reason for hiding this comment

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

This looks awesome! I found a few things for you to consider. Approving to unblock.

@meaghanlewis meaghanlewis merged commit af508fd into dotnet:main Sep 25, 2025
8 checks passed
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.

Update dotnet command documentation for new file-based app functionality
3 participants