NuGet Warning NU1508

Scenario 1

Duplicate 'NuGetAuditSuppress' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'NuGetAuditSuppress' items are: https://contoso.test/cve/1 , https://contoso.test/cve/1 .

Issue

Sometimes when adding NuGetAuditSuppress items, you may end up adding an item for a particular package multiple times.

MSBuild projects commonly import multiple .props and .targets files, so the duplicates might not be in the same file, but may be in included files, such as Directory.Build.props, Directory.Packages.props, or Directory.Build.targets.

Solution

Remove the duplicate item, so that it's included exactly once.