Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 914 Bytes

File metadata and controls

26 lines (18 loc) · 914 Bytes
title NuGet Warning NU1508
description NU1508 warning code
author zivkan
ms.author zivkan
ms.date 08/10/2024
ms.topic reference
f1_keywords
NU1508

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 imported 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.