noun-first form for dotnet CLI package add#14881
Open
Muckenbatscher wants to merge 2 commits intodotnet:release/13.2from
Open
noun-first form for dotnet CLI package add#14881Muckenbatscher wants to merge 2 commits intodotnet:release/13.2from
package add#14881Muckenbatscher wants to merge 2 commits intodotnet:release/13.2from
Conversation
* introduced in the dotnet 9 SDK * it is the form that is appearing in the dotnet CLI documentation, with `dotnet add package` only being left as a note for SDK version before 9
using `dotnet package add` instead of `dotnet add package`
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14881Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14881" |
This was referenced Mar 3, 2026
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.
Description
Use the "noun-first" form for adding NuGet packages. It was introduced in .NET SDK 9 for the CLI.
dotnet package addvs.dotnet add packageThis is the form that the dotnet CLI is referencing in the official documentation.
dotnet package addcommandAlso use the
--projectflag followed by the path to the project file as suggested by the documentation. But only for apps that are not file-based.For file-based apps keep the
--fileflag. (Which doesn't seem to have any official documentation...)Updated the Aspire.Cli.Tests to expect the "noun-first" form.
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: