Skip to content

Commit 8f6ad97

Browse files
authored
Never convert NU1901;NU1902;NU1903;NU1904 to Error (#32)
These error codes report vulnerable packages as a warning and because we convert warnings to errors for "Release" builds, they would subsequently fail a build. Therefore, we use the WarningsNotAsErrors property for these error codes as recommended here: https://devblogs.microsoft.com/nuget/nugetaudit-2-0-elevating-security-and-trust-in-package-management/
1 parent 61b430a commit 8f6ad97

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

build/Neolution.CodeAnalysis.TestsRuleset.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
<PropertyGroup>
55
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
6-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
7+
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
78
</PropertyGroup>
89

910
<PropertyGroup Condition="'$(Configuration)' != 'Debug'">

build/Neolution.CodeAnalysis.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<PropertyGroup>
55
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
7+
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
78
</PropertyGroup>
89

910
<PropertyGroup Condition="'$(Configuration)' != 'Debug'">

0 commit comments

Comments
 (0)