Errors and warnings

In NuGet 4.3.0+, errors and warnings are numbered as described in this topic and provide detailed information to help you address the issues involved.

The errors and warnings listed here are available only with PackageReference-based projects and NuGet 4.3.0+. NuGet also honors MSBuild properties to suppress warnings or elevate them to errors. For more information, see How to: Suppress Compiler Warnings in the Visual Studio documentation.

NuGet supports the following configuration properties.

Property Scope Description
TreatWarningsAsErrors Project Treats all NuGet warnings as errors
NoWarn Project, PackageReference, ProjectReference Suppress the warning for the current project, package or project reference
WarningsAsErrors Project Treat certain warnings as errors
WarningsNotAsErrors Project Treat certain warnings not as errors. Used in combination with TreatWarningsAsErrors set to true.

Errors

Group Error Numbers
Invalid input errors NU1001, NU1002, NU1003, NU1004, NU1005, NU1006, NU1007, NU1008, NU1009, NU1010, NU1011, NU1012,
Missing package and project errors NU1100, NU1101, NU1102, NU1103, NU1104, NU1105, NU1106, NU1107, NU1108, NU1109
Package source mapping errors NU1110
Compatibility errors NU1201, NU1202, NU1203, NU1204, NU1401, NU1402, NU1403
Dotnet Tool restore errors NU1211, NU1212, NU1213
NuGet source errors NU1301
NuGet internal errors NU1000
Signed packages errors (creation and verification) NU3001, NU3004, NU3005, NU3008, NU3034
Pack Errors NU5000, NU5001, NU5002, NU5003, NU5004, NU5005, NU5007, NU5008, NU5009, NU5010, NU5011, NU5012, NU5013, NU5014, NU5015, NU5016, NU5017, NU5018, NU5019, NU5020, NU5021, NU5022, NU5023, NU5024, NU5025, NU5026, NU5027, NU5028, NU5029, NU5036, NU5042, NU5049
License specific Pack Errors NU5030, NU5031, NU5032, NU5033, NU5034, NU5035
NuGetAudit specific warnings NU1014, NU1900, NU1901, NU1902, NU1903, NU1904, NU1905

Warnings

Group Warning numbers
Invalid input warnings NU1501, NU1502, NU1503, NU1504, NU1505, NU1506, NU1507
Unexpected package version warnings NU1601, NU1602, NU1603, NU1604, NU1605, NU1606, NU1607
Resolver conflict warnings NU1608
Package fallback warnings NU1701
Feed warnings NU1801, NU1802, NU1803
NuGet internal warnings NU1500
Signed packages warnings (creation and verification) NU3000, NU3002, NU3003, NU3006, NU3007, NU3009, NU3010, NU3011, NU3012, NU3013, NU3014, NU3015, NU3016, NU3017, NU3018, NU3019, NU3020, NU3021, NU3022, NU3023, NU3024, NU3025, NU3026, NU3027, NU3028, NU3029, NU3030, NU3031, NU3032, NU3033, NU3035, NU3036, NU3037, NU3038, NU3040, NU3042
Pack Warnings NU5100, NU5101, NU5102, NU5103, NU5104, NU5105, NU5106, NU5107, NU5108, NU5109, NU5110, NU5111, NU5112, NU5114, NU5115, NU5116, NU5117, NU5118, NU5119, NU5120, NU5121, NU5122, NU5123, NU5127, NU5128, NU5129, NU5130, NU5131, NU5133, NU5500, NU5501
License specific Pack Warnings NU5124, NU5125
Icon specific Pack Warnings NU5046, NU5047, NU5048