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 | NU1302 |
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
प्रतिक्रिया
https://aka.ms/ContentUserFeedback.
जल्द आ रहा है: 2024 के दौरान हम सामग्री के लिए फीडबैक तंत्र के रूप में GitHub मुद्दों को चरणबद्ध तरीके से समाप्त कर देंगे और इसे एक नई फीडबैक प्रणाली से बदल देंगे. अधिक जानकारी के लिए, देखें:के लिए प्रतिक्रिया सबमिट करें और देखें