Skip to content

Commit

Permalink
Create NU1508 (#3333)
Browse files Browse the repository at this point in the history
  • Loading branch information
zivkan authored Aug 13, 2024
1 parent 86705bd commit 57cf76b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@
### [NU1504](reference/errors-and-warnings/NU1504.md)
### [NU1505](reference/errors-and-warnings/NU1505.md)
### [NU1506](reference/errors-and-warnings/NU1506.md)
### [NU1507](reference/errors-and-warnings/NU1507.md)
### [NU1508](reference/errors-and-warnings/NU1508.md)
### [NU1601](reference/errors-and-warnings/NU1601.md)
### [NU1602](reference/errors-and-warnings/NU1602.md)
### [NU1603](reference/errors-and-warnings/NU1603.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/Errors-and-Warnings.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ NuGet supports the following configuration properties.

| Group | Warning numbers |
| --- | --- |
| 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) |
| 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) |
| 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) |
| Resolver conflict warnings | [NU1608](./errors-and-warnings/NU1608.md) |
| Package fallback warnings | [NU1701](./errors-and-warnings/NU1701.md), [NU1702](./errors-and-warnings/NU1702.md), [NU1703](./errors-and-warnings/NU1703.md)|
Expand Down
26 changes: 26 additions & 0 deletions docs/reference/errors-and-warnings/NU1508.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
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 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.

0 comments on commit 57cf76b

Please sign in to comment.