-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add preview 4 breaking change #46587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
43 changes: 43 additions & 0 deletions
43
docs/core/compatibility/sdk/10.0/dotnet-package-list-restore.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| --- | ||
| title: "Breaking change - dotnet package list command now performs restore by default" | ||
| description: "Learn about the breaking change in .NET 10 where the dotnet package list command now performs a restore before listing packages." | ||
| ms.date: 06/05/2025 | ||
| ai-usage: ai-assisted | ||
| ms.custom: https://github.com/dotnet/docs/issues/46103 | ||
| --- | ||
|
|
||
| # dotnet package list command now performs restore by default | ||
|
|
||
| The `dotnet package list` command now automatically performs a restore operation before listing packages to ensure accurate and up-to-date results. This is a behavioral change from the previous implementation where the command did not require a restore step. Additionally, if the restore operation fails, an error message is logged. | ||
|
|
||
| ## Version introduced | ||
|
|
||
| .NET 10 Preview 4 | ||
|
|
||
| ## Previous behavior | ||
|
|
||
| The `dotnet package list` command listed project packages without performing a restore. If a restore was needed, you had to run it manually before using the command. | ||
|
|
||
| ## New behavior | ||
|
|
||
| The `dotnet package list` command now automatically performs a restore before listing packages. If the restore fails, the command doesn't list packages and instead logs an error message in both plain text and JSON formats, depending on the command usage. | ||
|
|
||
| ## Type of breaking change | ||
|
|
||
| This change is a [behavioral change](../../categories.md#behavioral-change). | ||
|
|
||
| ## Reason for change | ||
|
|
||
| This change ensures the `dotnet package list` command provides accurate and up-to-date package information. | ||
|
|
||
| ## Recommended action | ||
|
|
||
| If this change causes issues in your workflow: | ||
|
|
||
| - Use the `--no-restore` option with `dotnet package list` if you want to bypass the implicit restore step. | ||
| - Make sure your project is ready for restore before running the `dotnet package list` command. | ||
| - Alternatively, run `dotnet restore` manually before using `dotnet package list` to decouple the restore step. | ||
|
|
||
| ## Affected APIs | ||
|
|
||
| None. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.