NuGet Integration

The configuration parameters that are specifically related to NuGet include the following:

  • nuget.resolveDependencies (By default, dependency resolution is enabled)
  • nuget.restoreDependencies
  • nuget.ignoreSourceFiles
  • nuget.runPreStep
  • nuget.resolvePackagesConfigFiles

  • nuget.resolveCsProjFiles

  • nuget.resolveDependencies

  • nuget.restoreDependencies

  • nuget.preferredEnvironment

  • nuget.packagesDirectory

  • nuget.ignoreSourceFiles

  • nuget.runPreStep

  • nuget.resolveNuspecFiles


For projects based on package references in package files (PackageReference), the following flags setup is recommended:

  • nuget.resolvePackagesConfigFiles=false
  • nuget.resolveCsProjFiles=true
  • nuget.resolveAssetsFiles=true


For projects based on packages.config, the following flags setup is recommended:

NOTE: It is highly recommended to use NuGet version 4.9 or higher in this case, as the Unified Agent will be able to generate the corresponding packages.lock.json file for better resolution.

  • nuget.resolvePackagesConfigFiles=true
  • nuget.resolveCsProjFiles=true
  • nuget.resolveAssetsFiles=false


For both package manager formats, please set the nuget.runPreStep to true if the project is not built prior to the scan.

For more information, see the Configuration File & Parameters page.