Skip to content

Commit 57cf76b

Browse files
authored
Create NU1508 (#3333)
1 parent 86705bd commit 57cf76b

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

docs/TOC.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@
183183
### [NU1504](reference/errors-and-warnings/NU1504.md)
184184
### [NU1505](reference/errors-and-warnings/NU1505.md)
185185
### [NU1506](reference/errors-and-warnings/NU1506.md)
186+
### [NU1507](reference/errors-and-warnings/NU1507.md)
187+
### [NU1508](reference/errors-and-warnings/NU1508.md)
186188
### [NU1601](reference/errors-and-warnings/NU1601.md)
187189
### [NU1602](reference/errors-and-warnings/NU1602.md)
188190
### [NU1603](reference/errors-and-warnings/NU1603.md)

docs/reference/Errors-and-Warnings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ NuGet supports the following configuration properties.
4343

4444
| Group | Warning numbers |
4545
| --- | --- |
46-
| Invalid input warnings | [NU1501](./errors-and-warnings/NU1501.md), [NU1502](./errors-and-warnings/NU1502.md), [NU1503](./errors-and-warnings/NU1503.md), [NU1504](./errors-and-warnings/NU1504.md), [NU1505](./errors-and-warnings/NU1505.md), [NU1506](./errors-and-warnings/NU1506.md), [NU1507](./errors-and-warnings/NU1507.md) |
46+
| Invalid input warnings | [NU1501](./errors-and-warnings/NU1501.md), [NU1502](./errors-and-warnings/NU1502.md), [NU1503](./errors-and-warnings/NU1503.md), [NU1504](./errors-and-warnings/NU1504.md), [NU1505](./errors-and-warnings/NU1505.md), [NU1506](./errors-and-warnings/NU1506.md), [NU1507](./errors-and-warnings/NU1507.md), [NU1508](./errors-and-warnings/NU1508.md) |
4747
| Unexpected package version warnings | [NU1601](./errors-and-warnings/NU1601.md), [NU1602](./errors-and-warnings/NU1602.md), [NU1603](./errors-and-warnings/NU1603.md), [NU1604](./errors-and-warnings/NU1604.md), [NU1605](./errors-and-warnings/NU1605.md), [NU1606](./errors-and-warnings/NU1108.md), [NU1607](./errors-and-warnings/NU1107.md) |
4848
| Resolver conflict warnings | [NU1608](./errors-and-warnings/NU1608.md) |
4949
| Package fallback warnings | [NU1701](./errors-and-warnings/NU1701.md), [NU1702](./errors-and-warnings/NU1702.md), [NU1703](./errors-and-warnings/NU1703.md)|
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: NuGet Warning NU1508
3+
description: NU1508 warning code
4+
author: zivkan
5+
ms.author: zivkan
6+
ms.date: 08/10/2024
7+
ms.topic: reference
8+
f1_keywords:
9+
- "NU1508"
10+
---
11+
12+
# NuGet Warning NU1508
13+
14+
## Scenario 1
15+
16+
> 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 .
17+
18+
### Issue
19+
20+
Sometimes when adding `NuGetAuditSuppress` items, you may end up adding an item for a particular package multiple times.
21+
22+
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`.
23+
24+
### Solution
25+
26+
Remove the duplicate item, so that it's included exactly once.

0 commit comments

Comments
 (0)