Edit

Share via


NuGet Error NU1014

Scenario

Invalid NuGetAudit value 'sample'. Valid values: true, false.

Invalid NuGetAuditLevel value 'sample';. Valid values: low, moderate, high, critical.

Invalid NuGetAuditMode value 'sample'. Valid values: direct, all.

Issue

Your project file, or a file it imports (for example Directory.Build.props) has defined the MSBuild property shown in the error message (either NuGetAudit, NuGetAuditLevel, or NuGetAuditMode) to an invalid value.

Solution

  • Remove the definition of the MSBuild property to use NuGet's default.
  • Change the value of the MSBuild property to a value that the error lists as valid.

For example, if one of your MSBuild files currently has <NuGetAuditLevel>sample<NuGetAuditLevel>, either delete the line, or change it to <NuGetAuditLevel>low</NuGetAuditLevel>.

To find where the property is being defined, you can use MSBuild's -preprocess command line argument. Also see MSBuild's example on the page for customizing the build.