dotnet restore
The dotnet command that downloads the NuGet packages a project depends on and records the resolved dependency graph.
In more detail
Build, run, test and publish restore automatically, so you run it on its own mainly in continuous integration. The --no-restore flag skips the step when a restore already happened earlier in the same job.
Examples
dotnet restoredotnet test --no-restoreRelated terms
- NuGet — The package manager for .NET: a NuGet package is a zip of compiled libraries that projects reference by name and version.
- dotnet build — The dotnet command that compiles a project or solution and its dependencies into assemblies.
- central package management — A NuGet feature that records every package version for a repository in one Directory.Packages.props file, so project files name packages without versions.
- lock file — A file listing the exact version of every dependency, so installs are repeatable.
Taught in
- What is .NET? Runtime vs SDK, and LTS vs STS — Modern .NET Core, C# & Enterprise Microservices
- Directory.Build.props, global.json and Central Packages — Modern .NET Core, C# & Enterprise Microservices
- Unit Testing with xUnit and NSubstitute — Modern .NET Core, C# & Enterprise Microservices