Error NU3001 has 7 scenarios causing maintainability issues #9598
Labels
Area:ErrorHandling
warnings and errors/log messages & related error codes.
Category:Quality Week
Issues that should be considered for quality week
Functionality:Signing
Priority:2
Issues for the current backlog.
Type:DCR
Design Change Request
NU3001 error code has 7 scenarios where few of them are dependent upon
Exception.HResult Property
causing maintainability issues.For e.g. https://github.com/NuGet/NuGet.Client/blob/eb9ad919724e5ef435d6321b775868c9f2c0f9a2/src/NuGet.Core/NuGet.Commands/SignCommand/CertificateProvider.cs#L59-L90
This logic broke tests in package signing logic when
dotnet
returns a differentHRResult
value. For e.g. #9523As per dotnet/runtime#36786 (comment),
dotnet doesnot guarantee the HResult values of most of our exceptions, depending on them is going to be fragile.
.We need to re-evaluate all the 7 scenarios of NU3001 error code and implement code that doesn't reply on
Exception.HRResult
if possible.The text was updated successfully, but these errors were encountered: