You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update dotnet restore documentation
Fixes#15520.
- Move information about implicit restore to the top of document (the first thing most people should know about this command is that you usually don't need to run it)
- Fix terminology: Package cache -> Global packages folder
* Update docs/core/tools/dotnet-restore.md
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
Copy file name to clipboardExpand all lines: docs/core/tools/dotnet-restore.md
+13-19Lines changed: 13 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,17 @@ dotnet restore -h|--help
26
26
27
27
## Description
28
28
29
-
The `dotnet restore` command uses NuGet to restore dependencies as well as project-specific tools that are specified in the project file. By default, the restoration of dependencies and tools are executed in parallel.
29
+
The `dotnet restore` command uses NuGet to restore dependencies as well as project-specific tools that are specified in the project file. In most cases, you don't need to explicitly use the `dotnet restore` command, since a NuGet restore is run implicitly if necessary when you run the following commands:
30
+
31
+
-[`dotnet new`](dotnet-new.md)
32
+
-[`dotnet build`](dotnet-build.md)
33
+
-[`dotnet build-server`](dotnet-build-server.md)
34
+
-[`dotnet run`](dotnet-run.md)
35
+
-[`dotnet test`](dotnet-test.md)
36
+
-[`dotnet publish`](dotnet-publish.md)
37
+
-[`dotnet pack`](dotnet-pack.md)
38
+
39
+
Sometimes, it might be inconvenient to run the implicit NuGet restore with these commands. For example, some automated systems, such as build systems, need to call `dotnet restore` explicitly to control when the restore occurs so that they can control network usage. To prevent the implicit NuGet restore, you can use the `--no-restore` flag with any of these commands to disable implicit restore.
30
40
31
41
### Specify feeds
32
42
@@ -39,9 +49,9 @@ You can override the *nuget.config* feeds with the `-s` option.
39
49
40
50
For information about how to use authenticated feeds, see [Consuming packages from authenticated feeds](/nuget/consume-packages/consuming-packages-authenticated-feeds).
41
51
42
-
### Package cache
52
+
### Global packages folder
43
53
44
-
For dependencies, you specify where the restored packages are placed during the restore operation using the `--packages` argument. If not specified, the default NuGet package cache is used, which is found in the `.nuget/packages` directory in the user's home directory on all operating systems. For example, */home/user1* on Linux or *C:\Users\user1* on Windows.
54
+
For dependencies, you can specify where the restored packages are placed during the restore operation using the `--packages` argument. If not specified, the default NuGet package cache is used, which is found in the `.nuget/packages` directory in the user's home directory on all operating systems. For example, */home/user1* on Linux or *C:\Users\user1* on Windows.
45
55
46
56
### Project-specific tooling
47
57
@@ -65,22 +75,6 @@ There are three specific settings that `dotnet restore` ignores:
65
75
66
76
This setting isn't applicable as [NuGet doesn't yet support cross-platform verification](https://github.com/NuGet/Home/issues/7939) of trusted packages.
67
77
68
-
## Implicit restore
69
-
70
-
The `dotnet restore` command is run implicitly if necessary when you run the following commands:
71
-
72
-
-[`dotnet new`](dotnet-new.md)
73
-
-[`dotnet build`](dotnet-build.md)
74
-
-[`dotnet build-server`](dotnet-build-server.md)
75
-
-[`dotnet run`](dotnet-run.md)
76
-
-[`dotnet test`](dotnet-test.md)
77
-
-[`dotnet publish`](dotnet-publish.md)
78
-
-[`dotnet pack`](dotnet-pack.md)
79
-
80
-
In most cases, you don't need to explicitly use the `dotnet restore` command.
81
-
82
-
Sometimes, it might be inconvenient to run `dotnet restore` implicitly. For example, some automated systems, such as build systems, need to call `dotnet restore` explicitly to control when the restore occurs so that they can control network usage. To prevent `dotnet restore` from running implicitly, you can use the `--no-restore` flag with any of these commands to disable implicit restore.
0 commit comments