dotnet restore downloads the NuGet packages referenced by a project so the application has the dependencies needed for building and running. Run it from the project folder. Visual Studio and newer .NET CLI workflows usually restore automatically, but the explicit command makes the dependency step visible. section 3.2.2 section 27.1.1
Use restore as part of the normal project workflow:
- Add a dependency as a PackageReference in the project file. section 12.2.1
- Run dotnet restore in the project directory, or let Visual Studio restore the packages. section 12.2.1 section 3.2.2
- Build or run the application; dotnet build and dotnet run normally invoke restore automatically. section 3.2.2
Restoring an EF Core provider
A project can reference Microsoft.EntityFrameworkCore.SQLite and Microsoft.EntityFrameworkCore.Design in its .csproj file. Running dotnet restore downloads these packages and prepares them for building the data model and application. section 12.2.1
