Skip to content

Commit 6d34184

Browse files
authored
Merge branch 'live' into master
2 parents fa60c76 + 904cbee commit 6d34184

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

docs/consume-packages/Package-References-in-Project-Files.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,12 @@ ProjectA
232232
If `ProjectA` has a dependency on a `PackageX` version `2.0.0` and also references `ProjectB` that depends on `PackageX` version `1.0.0`, then the lock file for `ProjectB` will list a dependency on `PackageX` version `1.0.0`. However, when `ProjectA` is built, its lock file will contain a dependency on `PackageX` version **`2.0.0`** and **not** `1.0.0` as listed in the lock file for `ProjectB`. Thus, the lock file of a common code project has little say over the packages resolved for projects that depend on it.
233233

234234
### Lock file extensibility
235+
235236
You can control various behaviors of restore with lock file as described below:
236237

237-
| Option | MSBuild equivalent option |
238-
|:--- |:--- |
239-
| `--use-lock-file` | Bootstraps use of lock file for a project. You can alternatively set `RestorePackagesWithLockFile` property in the project file |
240-
| `--locked-mode` | Enables locked mode for restore. This is useful in CI/CD scenarios where you would like to get the repeatable builds. This can be also by setting the `RestoreLockedMode` MSBuild property to `true` |
241-
| `--force-evaluate` | This option is useful with packages with floating version defined in the project. By default, NuGet restore will not update the package version automatically upon each restore unless you run restore with `--force-evaluate` option. |
242-
| `--lock-file-path` | Defines a custom lock file location for a project. This can be also achieved by setting the MSBuild property `NuGetLockFilePath`. By default, NuGet supports `packages.lock.json` at the root directory. If you have multiple projects in the same directory, NuGet supports project specific lock file `packages.<project_name>.lock.json` |
238+
| Option | MSBuild equivalent option | Description|
239+
|:--- |:--- |:--- |
240+
| `--use-lock-file` | RestorePackagesWithLockFile | Opts into the usage of a lock file. |
241+
| `--locked-mode` | RestoreLockedMode | Enables locked mode for restore. This is useful in CI/CD scenarios where you want repeatable builds.|
242+
| `--force-evaluate` | RestoreForceEvaluate | This option is useful with packages with floating version defined in the project. By default, NuGet restore will not update the package version automatically upon each restore unless you run restore with this option. |
243+
| `--lock-file-path` | NuGetLockFilePath | Defines a custom lock file location for a project. By default, NuGet supports `packages.lock.json` at the root directory. If you have multiple projects in the same directory, NuGet supports project specific lock file `packages.<project_name>.lock.json` |

docs/reference/cli-reference/cli-ref-restore.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ where `<projectPath>` specifies the location of a solution or a `packages.config
4545
| RequireConsent | Verifies that restoring packages is enabled before downloading and installing the packages. For details, see [Package Restore](../../consume-packages/package-restore.md). |
4646
| SolutionDirectory | Specifies the solution folder. Not valid when restoring packages for a solution. Required when restoring with a `packages.config` file unless `PackagesDirectory` or `OutputDirectory` is used. |
4747
| Source | Specifies the list of package sources (as URLs) to use for the restore. If omitted, the command uses the sources provided in configuration files, see [Configuring NuGet behavior](../../consume-packages/configuring-nuget-behavior.md). Use a semicolon to separate list entries. |
48+
| Force | In PackageReference based projects, forces all dependencies to be resolved even if the last restore was successful. Specifying this flag is similar to deleting the `project.assets.json` file. This does not bypass the http-cache. |
4849
| Verbosity | Specifies the amount of detail displayed in the output: *normal*, *quiet*, *detailed*. |
4950

5051
Also see [Environment variables](cli-ref-environment-variables.md)

docs/reference/msbuild-targets.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,11 @@ Additional restore settings may come from MSBuild properties in the project file
376376
| RestoreGraphProjectInput | Semicolon-delimited list of projects to restore, which should contain absolute paths. |
377377
| RestoreUseSkipNonexistentTargets | When the projects are collected via MSBuild it determines whether they are collected using the `SkipNonexistentTargets` optimization. When not set, defaults to `true`. The consequence is a fail-fast behavior when a project's targets cannot be imported. |
378378
| MSBuildProjectExtensionsPath | Output folder, defaulting to `BaseIntermediateOutputPath` and the `obj` folder. |
379+
| RestoreForce | In PackageReference based projects, forces all dependencies to be resolved even if the last restore was successful. Specifying this flag is similar to deleting the `project.assets.json` file. This does not bypass the http-cache. |
380+
| RestorePackagesWithLockFile | Opts into the usage of a lock file. |
381+
| RestoreLockedMode | Run restore in locked mode. This means that restore will not reevaluate the dependencies. |
382+
| NuGetLockFilePath | A custom location for the lock file. The default location is next to the project and is named `packages.lock.json`. |
383+
| RestoreForceEvaluate | Forces restore to recompute the dependencies and update the lock file without any warning. |
379384

380385
#### Examples
381386

docs/release-notes/NuGet-5.3.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ NuGet distribution vehicles:
1515
|:---|:---|:---|
1616
| [**5.3.0**](https://nuget.org/downloads) | [Visual Studio 2019 version 16.3](https://visualstudio.microsoft.com/downloads/) | [3.0.100](https://dotnet.microsoft.com/download/dotnet-core/3.0)<sup>1</sup> |
1717
| [**5.3.1**](https://nuget.org/downloads) | [Visual Studio 2019 version 16.3.6](https://visualstudio.microsoft.com/downloads/) | [Future version: 3.0.101](https://dotnet.microsoft.com/download/dotnet-core/3.0) |
18+
1819
<sup>1</sup>Installed with Visual Studio 2019 with .NET Core workload
1920

2021
## Summary: What's New in 5.3

0 commit comments

Comments
 (0)