Skip to content

Don't bail on error when listing packages - #7671

Merged
nkolev92 merged 6 commits into
NuGet:devfrom
JasonWeinzierl:continue-listing-after-error
Sep 15, 2026
Merged

nkolev92 merged 6 commits into
NuGet:devfrom
JasonWeinzierl:continue-listing-after-error

Conversation

@JasonWeinzierl

@JasonWeinzierl JasonWeinzierl commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Bug

Fixes: NuGet/Home#12817
Fixes: NuGet/Home#12520

Description

Solutions containing JavaScript projects (.esproj) or Docker Compose projects (.dcproj) cause dotnet list packages to bail upon first failure, cutting off output from other valid projects. This is especially frustrating when using dotnet list packages --outdated to look for packages that I should bump.

This PR only changes the fail-fast behavior to continue despite project errors. The solution is already loaded, we're just changing the rendering. This also adjusts the output error message to not incorrectly say that the package is a packages.config project. Note this also affects the output of dotnet nuget why in similar situations.

This doesn't fix the 1 exit code (that seemed to be a larger behavior change). And as other comments proposed in the issue, _IsProjectRestoreSupported getting changed to a no-op would need to be done in the javascript sdk, and then list packages would need to honor it.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@JasonWeinzierl
JasonWeinzierl requested a review from a team as a code owner August 30, 2026 15:43
@dotnet-policy-service dotnet-policy-service Bot added the Community PRs created by someone not in the NuGet team label Aug 30, 2026
@nkolev92

nkolev92 commented Sep 1, 2026

Copy link
Copy Markdown
Member

@baronfel @JonDouglas

This change tweaks the behavior of dotnet.exe with non-SDK projects.

When running on a solution with non-SDK projects, now it won't fail fast anymore and it'll complete the operation for the rest of projects.
This doesn't make the commands return 0 for non SDK projects (which I agree with).

Any concerns?

Happy to chat offline if you want more details.

@dotnet-policy-service dotnet-policy-service Bot added the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Sep 9, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 30 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch.

@dotnet-policy-service dotnet-policy-service Bot removed the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Sep 9, 2026
@nkolev92
nkolev92 merged commit c6377d5 into NuGet:dev Sep 15, 2026
16 checks passed
@JasonWeinzierl
JasonWeinzierl deleted the continue-listing-after-error branch September 16, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PRs created by someone not in the NuGet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding an .esproj project to the solution breaks dotnet list package dotnet list package returns error if solution includes a docker-compose project

5 participants