Install and manage packages in Visual Studio using the NuGet Package Manager

Install and manage packages in Visual Studio using the NuGet Package Manager

Install and Update Options

(Not available for all project types.)

Dependency behavior configures how NuGet decides which versions of dependent packages to install:

  • Ignore dependencies skips installing any dependencies, which typically breaks the package being installed.
  • Lowest [Default] installs the dependency with the minimal version number that meets the requirements of the primary chosen package.
  • Highest Patch installs the version with the same major and minor version numbers, but the highest patch number. For example, if version 1.2.2 is specified then the highest version that starts with 1.2 will be installed
  • Highest Minor installs the version with the same major version number but the highest minor number and patch number. If version 1.2.2 is specified, then the highest version that starts with 1 will be installed
  • Highest installs the highest available version of the package.

File conflict action specifies how NuGet should handle packages that already exist in the project or local machine:

  • Prompt instructs NuGet to ask whether to keep or overwrite existing packages.
  • Ignore All instructs NuGet to skip overwriting any existing packages.
  • Overwrite All instructs NuGet to overwrite any existing packages.
原文地址:https://www.cnblogs.com/chucklu/p/14005861.html