Document .NET 11 CLI improvements - #55979
Open
meaghanlewis with Copilot wants to merge 8 commits into
Open
meaghanlewis with Copilot wants to merge 8 commits into
meaghanlewis with Copilot wants to merge 8 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: meaghanlewis <10103121+meaghanlewis@users.noreply.github.com>
Co-authored-by: meaghanlewis <10103121+meaghanlewis@users.noreply.github.com>
Co-authored-by: meaghanlewis <10103121+meaghanlewis@users.noreply.github.com>
Co-authored-by: meaghanlewis <10103121+meaghanlewis@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Document new CLI options in .NET 11
Document .NET 11 CLI options
Sep 15, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Several unresolved documentation inaccuracies must be corrected before approval.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (8)
docs/core/tools/dotnet-format.md:63
--frameworkis mutually exclusive with the existing--folderoption fordotnet format whitespace; the CLI rejects that combination. Because this new description explains framework selection but omits the restriction, users can follow the page and get an error. Document the incompatibility.
Specifies the target framework moniker (TFM), such as `net11.0`, to format in a multi-targeted project. If you don't specify this option, `dotnet format` formats all target frameworks. Available starting with .NET 11.
docs/core/tools/dotnet-format.md:21
- The SDK registers
--frameworkwith-fas an alias, but the synopsis omits the short form. Include-f|so the command syntax matches the actual CLI and users can discover the supported shorthand.
[--framework <FRAMEWORK>] [--include <INCLUDE>] [--include-generated]
docs/core/tools/dotnet-reference-add.md:66
--fileand--projectare mutually exclusive; the CLI fails if both are supplied. The new synopsis lists both options as independently optional, and the option text doesn't state the restriction, so document it to avoid invalid combinations.
Specifies the file-based app to add project references to. For example, specify `app.cs` to add `#:project` directives to a file-based app. Available starting with .NET 11.
docs/core/tools/dotnet-reference-add.md:66
- The new file mode has different behavior and option validity than project mode: it writes
#:projectdirectives, and--frameworkis rejected for file-based apps. The article's description still says the command only adds<ProjectReference>elements, while this option text doesn't state the restriction, so users can follow the synopsis into a guaranteed error. Update both descriptions.
- **`--file <FILE>`**
Specifies the file-based app to add project references to. For example, specify `app.cs` to add `#:project` directives to a file-based app. Available starting with .NET 11.
docs/core/tools/dotnet-sln.md:175
- Name-based removal isn't supported for
.slnffiles: filter removal matches the stored relative project path and doesn't perform the name-without-extension lookup described below. This new wording now promisesPROJECT_NAMEsupport for filters; restrict that argument to solution files or document the filter limitation.
The path to, or name of, the project or projects to remove from the solution or solution filter. Unix/Linux shell [globbing pattern](https://en.wikipedia.org/wiki/Glob_(programming)) expansions are processed correctly by the `dotnet sln` command.
docs/core/tools/dotnet-sln.md:120
- The
addsubsection description at line 107 still says “solution file,” so the new.slnfsupport is omitted from the command summary. Update the summary to mention solution filters as well.
The solution file (*.sln* or *.slnx* file) or solution filter (*.slnf* file) to use.
docs/core/tools/dotnet-sln.md:167
- The
removesubsection description at line 154 still says “solution file,” so the new.slnfsupport is omitted from the command summary. Update the summary to mention solution filters as well.
The solution file (*.sln* or *.slnx* file) or solution filter (*.slnf* file) to use.
docs/core/tools/dotnet-sln.md:58
- The
slnftemplate creates a filter that references a parent.slnor.slnx; it doesn't create that parent solution, and projects added to a filter must already exist in the parent. As written, this setup creates neither the parent norsrc/Lib/Lib.csproj, so the subsequentdotnet slncommands can't work. Create the solution and project, add the project to the parent, and then create the filter.
Starting with .NET 11, you can create a [solution filter](/visualstudio/msbuild/solution-filters) (*.slnf* file) with the `slnf` template:
```dotnetcli
dotnet new slnf --name MyApp.slnf
- **Files reviewed:** 5/5 changed files
- **Comments generated:** 4
- **Review effort level:** Lite
</details>
|
|
||
| ```dotnetcli | ||
| dotnet reference add reference [-f|--framework <FRAMEWORK>] | ||
| dotnet reference add reference [--file <FILE>] [-f|--framework <FRAMEWORK>] |
| - **`PROJECT_PATH`** | ||
|
|
||
| The path to the project or projects to add to the solution. Unix/Linux shell [globbing pattern](https://en.wikipedia.org/wiki/Glob_(programming)) expansions are processed correctly by the `dotnet sln` command. | ||
| The path to the project or projects to add to the solution or solution filter. Unix/Linux shell [globbing pattern](https://en.wikipedia.org/wiki/Glob_(programming)) expansions are processed correctly by the `dotnet sln` command. |
| - Create a solution filter, add a project, list the projects, and remove the project: | ||
|
|
||
| ```dotnetcli | ||
| dotnet new slnf --name MyApp.slnf |
|
|
||
| - **`-y|--yes`** | ||
|
|
||
| Accepts all confirmation prompts, including the prompt to download and run the tool package. Use this option only with packages and package sources that you trust. Available starting with .NET 11. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents .NET 11 CLI additions missing from command references and clarifies NuGet subcommand help behavior.
Project references
dotnet reference add --filesyntax and guidance for file-based apps.Formatting
dotnet format --frameworksyntax and multi-targeting guidance.Tool execution
dotnet tool exec --yessyntax, confirmation behavior, and trust guidance.Solution filters
*.slnf*files) indotnet sln, including new instructions for creating, adding, listing, and removing projects from solution filters. Updated all relevant sections to mention solution filters and clarified option descriptions.dotnet new install --prelease
--prereleaseoption todotnet new installto allow selection of the latest prerelease template package version. Updated synopsis and description accordingly.Internal previews
Build report