Skip to content

Conversation

@Nigusu-Allehu
Copy link
Member

@Nigusu-Allehu Nigusu-Allehu commented Sep 24, 2025

Bug

Fixes: NuGet/Home#14608

Description

This PR implements the following design spec NuGet/Home#14495. It adds an implementation for the dotnet package download command. Audit is not implemented in this PR, and will be added in a follow up PR.

  • Downloads NuGet packages
    The command allows users to download NuGet packages directly. By default, packages are downloaded to the current working directory (CWD). Users can optionally specify a different output directory.

Version Resolution

The ResolvePackageDownloadVersion method determines which version of a package to download from the provided sources:

  • Exact version: If the user specifies a single version (not a range), the method checks each source until it finds that version.
    • If no version is specified -> the latest version is chosen.

The method returns both the resolved NuGetVersion and the SourceRepository it came from. If no valid version is found, an error is logged.

Usage Example

dotnet package download <PackageID> [-o <Path>]
  • If no output directory is specified, the current working directory will be used.

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. document package download command Home#14558

@Nigusu-Allehu Nigusu-Allehu force-pushed the dev-nyenework-packagedownload branch 3 times, most recently from bd2b8ed to 319cf63 Compare September 24, 2025 22:28
@Nigusu-Allehu Nigusu-Allehu self-assigned this Sep 25, 2025
@Nigusu-Allehu Nigusu-Allehu marked this pull request as ready for review September 25, 2025 16:31
@Nigusu-Allehu Nigusu-Allehu requested a review from a team as a code owner September 25, 2025 16:31
@jeffkl jeffkl self-requested a review September 30, 2025 22:29
Copy link
Contributor

@aortiz-msft aortiz-msft left a comment

Choose a reason for hiding this comment

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

🕐

@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 Oct 8, 2025
@Nigusu-Allehu Nigusu-Allehu reopened this Oct 15, 2025
@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 Oct 15, 2025
@Nigusu-Allehu Nigusu-Allehu force-pushed the dev-nyenework-packagedownload branch from d5aa961 to 80dce46 Compare October 15, 2025 23:12
@Nigusu-Allehu Nigusu-Allehu force-pushed the dev-nyenework-packagedownload branch from 5636baf to 3a94836 Compare October 17, 2025 19:49
@Nigusu-Allehu
Copy link
Member Author

@NuGet/nuget-client 👀

Copy link
Member

@nkolev92 nkolev92 left a comment

Choose a reason for hiding this comment

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

I just found one thing that I missed the previous review.

@aortiz-msft aortiz-msft dismissed their stale review October 25, 2025 16:25

revoking review

Copy link
Contributor

@aortiz-msft aortiz-msft left a comment

Choose a reason for hiding this comment

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

See comments

@Nigusu-Allehu Nigusu-Allehu merged commit 6d3aa38 into dev-feature-package-download Oct 28, 2025
16 of 17 checks passed
@Nigusu-Allehu Nigusu-Allehu deleted the dev-nyenework-packagedownload branch October 28, 2025 00:58
@Nigusu-Allehu Nigusu-Allehu mentioned this pull request Oct 31, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "dotnet nuget install" command

6 participants