Commit 3283072
Stop failing the build on low/moderate NuGet audit advisories (#1660)
## Summary
Stops the build from failing on low/moderate NuGet audit advisories
while keeping them visible as warnings.
## Why
PR #1657's CI failed at restore time with:
```
error NU1901: Warning As Error: Package 'NuGet.Packaging' 7.0.1 has a known low severity vulnerability
error NU1901: Warning As Error: Package 'NuGet.Protocol' 7.0.1 has a known low severity vulnerability
```
These are pulled in transitively by build tooling (CodeGen) and cannot
be upgraded without breaking other constraints.
## Changes
- Add `NU1901` (low) and `NU1902` (moderate) to `<WarningsNotAsErrors>`
in `Directory.Build.props`. They remain visible as warnings but no
longer fail the build via `TreatWarningsAsErrors`. `NU1903` (high) and
`NU1904` (critical) still fail the build.
- `CodeGen.csproj` had its own `<WarningsNotAsErrors>` that overrode
(not appended to) the one in `Directory.Build.props`. Prefix it with
`$(WarningsNotAsErrors);` so the project inherits the NU codes (and the
obsolete codes) while keeping its nullability suppressions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ad445ef commit 3283072
2 files changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
10 | 20 | | |
11 | 21 | | |
12 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
0 commit comments