-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add documentation for dotnet package download command #49659
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
10 commits
Select commit
Hold shift + click to select a range
c0950d5
Add documentation for dotnet package download command
Nigusu-Allehu 9213649
add
Nigusu-Allehu fe65e1f
Fix style issues and missing documentation in dotnet package download…
Copilot 8011c7a
remove
Nigusu-Allehu bb01f58
Update docs/core/tools/dotnet-package-download.md
Nigusu-Allehu 391a6cc
remove
Nigusu-Allehu ffb3fb8
white space
Nigusu-Allehu 7298868
Apply suggestion from @gewarren
Nigusu-Allehu 19c821b
Apply suggestion from @gewarren
Nigusu-Allehu 3522f53
sort
Nigusu-Allehu 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| --- | ||
| title: dotnet package download command | ||
| description: Download a nuget package. | ||
| author: Nigusu-Allehu | ||
| ms.date: 11/06/2025 | ||
Nigusu-Allehu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| --- | ||
| # dotnet package download | ||
|
|
||
| > Applies to: ✔️ .NET 10 SDK and later versions. | ||
Nigusu-Allehu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Name | ||
|
|
||
| `dotnet package download` — Download one or more NuGet packages to disk. | ||
|
|
||
| ## Synopsis | ||
|
|
||
| ``` | ||
| dotnet package download [<packages>...] | ||
| [--output <path>] | ||
| [--configfile <path> ] | ||
| [--include-transitive] | ||
Nigusu-Allehu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| [--source <package source>] | ||
| [--allow-insecure-connections] | ||
| [--interactive] | ||
| [--verbosity <level>] | ||
|
|
||
| dotnet package download -h|--help | ||
| ``` | ||
|
|
||
| ## Description | ||
|
|
||
| `dotnet package download` donwloads NuGet packages to a local directory. It **does not** add or update `PackageReference` entries in project files and **does not** build or restore a project. | ||
|
Check failure on line 32 in docs/core/tools/dotnet-package-download.md
|
||
Nigusu-Allehu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| By default, the command downloads only the packages you specify (no transitive dependencies) to the current working directory. | ||
|
|
||
| ## Arguments | ||
|
|
||
| * **`packages`** | ||
| One or more package IDs to download. | ||
Nigusu-Allehu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Each package can optionally include a version with `@`. | ||
| If a package version is not specified the latest version of the package is downloaded. | ||
Nigusu-Allehu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| For example, dotnet package update Contoso.Utilities or dotnet package update [email protected]. | ||
Nigusu-Allehu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Nigusu-Allehu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Options | ||
|
|
||
| * **`--allow-insecure-connections`** | ||
|
|
||
| Allows downloading from HTTP sources. Without this flag, insecure sources cause the command to error per [HTTPS-everywhere](https://aka.ms/nuget-https-everywhere) guidance. | ||
Nigusu-Allehu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| * **`--configfile <path>`** | ||
|
|
||
| Path to a NuGet.config to use. | ||
|
|
||
| * **`--interactive`** | ||
|
|
||
| Enables interactive authentication if required. | ||
|
|
||
| * **`-o, --output <path>`** | ||
|
|
||
| Directory where the package will be placed. Defaults to the current working directory. | ||
Nigusu-Allehu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| * **`--prerelease`** | ||
|
|
||
| Allows downloading prerelease versions. | ||
Nigusu-Allehu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| * **`-s --source <package source>`** | ||
|
|
||
| Specifies the NuGet package source to use. | ||
Nigusu-Allehu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| * **`-v --verbosity <level>`** | ||
Nigusu-Allehu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Set the verbosity level of the command Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. | ||
Nigusu-Allehu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| [!INCLUDE [help](../../../includes/cli-help.md)] | ||
|
|
||
| ## Examples | ||
|
|
||
| ### Download a single package at a specific version | ||
|
|
||
| ```ps1 | ||
| dotnet package download [email protected] --output My/Destination/For/packages | ||
| ``` | ||
|
|
||
| ### Download multiple packages to a custom folder | ||
|
|
||
| ```ps1 | ||
| dotnet package download [email protected] [email protected] --output My/Destination/For/packages | ||
| ``` | ||
|
|
||
| ### Download including transitive dependencies | ||
|
|
||
| ```ps1 | ||
| dotnet package download Azure.Storage.Blobs --include-transitive --output ./cache | ||
| ``` | ||
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.