LinuxCommandLibrary

dotnet-restore

NuGet package dependency restorer

TLDR

Restore dependencies

$ dotnet restore
copy
Restore specific project
$ dotnet restore [project.csproj]
copy
Restore with specific source
$ dotnet restore --source [https://api.nuget.org/v3/index.json]
copy
Restore without cache
$ dotnet restore --no-cache
copy
Restore for specific runtime
$ dotnet restore --runtime [linux-x64]
copy

SYNOPSIS

dotnet restore [project] [options]

DESCRIPTION

dotnet restore downloads and installs all NuGet package dependencies specified in project files. It resolves package versions, handles transitive dependencies, and caches packages locally for faster subsequent restores.
The command reads package references from .csproj/.fsproj files and nuget.config, then downloads packages from configured NuGet sources. Restore is typically automatic before build/run commands but can be run explicitly for troubleshooting or CI/CD pipelines.

PARAMETERS

-s, --source source

NuGet package source.
--packages directory
Directory for restored packages.
--no-cache
Don't cache packages and requests.
--runtime rid
Target runtime to restore for.
--configfile file
NuGet config file to use.
--disable-parallel
Disable parallel restore.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community