539 references to NuGetLogCode
Microsoft.NET.Build.Tasks (1)
LockFileCache.cs (1)
126code: message.Code == NuGetLogCode.Undefined ? default : message.Code.ToString(),
NuGet.Build.Tasks (15)
CheckForDuplicateNuGetItemsTask.cs (8)
58NuGetLogCode logCode = (NuGetLogCode)Enum.Parse(typeof(NuGetLogCode), LogCode); 82var warnAsErrorCodes = new HashSet<NuGetLogCode>(); 84var noWarnCodes = new HashSet<NuGetLogCode>(); 87var warningNotAsErrorsCodes = new HashSet<NuGetLogCode>(); 93private static void ReadNuGetLogCodes(string str, HashSet<NuGetLogCode> hashCodes) 97if (Enum.TryParse(code, out NuGetLogCode logCode))
Common\MSBuildLogger.cs (6)
158if (logMessage.Code > NuGetLogCode.Undefined) 162Enum.GetName(typeof(NuGetLogCode), logMessage.Code), 163Enum.GetName(typeof(NuGetLogCode), logMessage.Code), 182if (logMessage.Code > NuGetLogCode.Undefined) 186Enum.GetName(typeof(NuGetLogCode), logMessage.Code), 187Enum.GetName(typeof(NuGetLogCode), logMessage.Code),
GetReferenceNearestTargetFrameworkTask.cs (1)
182var warning = RestoreLogMessage.CreateWarning(NuGetLogCode.NU1702, message);
NuGet.Build.Tasks.Console (2)
MSBuildStaticGraphRestore.cs (2)
376ImmutableArray<NuGetLogCode> noWarn = MSBuildStringUtility.GetNuGetLogCodes(packageReferenceItem.GetProperty("NoWarn")); 916var restoreLogMessage = RestoreLogMessage.CreateError(NuGetLogCode.NU1105, errorMessage);
NuGet.Build.Tasks.Pack (30)
PackTaskLogic.cs (24)
60throw new PackagingException(NuGetLogCode.NU5022, string.Format( 118throw new PackagingException(NuGetLogCode.NU5023, string.Format( 147throw new PackagingException(NuGetLogCode.NU5024, string.Format( 202throw new PackagingException(NuGetLogCode.NU5022, string.Format( 218throw new PackagingException(NuGetLogCode.NU5025, string.Format( 262throw new PackagingException(NuGetLogCode.NU5035, string.Format( 269throw new PackagingException(NuGetLogCode.NU5033, string.Format( 293throw new PackagingException(NuGetLogCode.NU5032, string.Format( 302throw new PackagingException(NuGetLogCode.NU5034, string.Format( 333throw new PackagingException(NuGetLogCode.NU5034, string.Format( 348throw new PackagingException(NuGetLogCode.NU5028, Strings.NoPackItemProvided); 467throw new PackagingException(NuGetLogCode.NU5051, 537throw new PackagingException(NuGetLogCode.NU5026, string.Format(CultureInfo.CurrentCulture, Strings.Error_FileNotFound, finalOutputPath)); 554throw new PackagingException(NuGetLogCode.NU5051, 565throw new PackagingException(NuGetLogCode.NU5027, string.Format(CultureInfo.CurrentCulture, Strings.InvalidTargetFramework, finalOutputPath)); 624throw new PackagingException(NuGetLogCode.NU5028, Strings.NoPackItemProvided); 891throw new PackagingException(NuGetLogCode.NU5051, 1002var packageSpecificNoWarnProperties = new Dictionary<string, HashSet<(NuGetLogCode, NuGetFramework)>>(StringComparer.OrdinalIgnoreCase); 1054Dictionary<string, HashSet<(NuGetLogCode, NuGetFramework)>> packageSpecificNoWarnProperties) 1076Dictionary<string, HashSet<(NuGetLogCode, NuGetFramework)>> packageSpecificNoWarnProperties) 1101Dictionary<string, HashSet<(NuGetLogCode, NuGetFramework)>> packageSpecificNoWarnProperties, 1135HashSet<(NuGetLogCode, NuGetFramework)> nowarnProperties = null; 1139nowarnProperties = new HashSet<(NuGetLogCode, NuGetFramework)>(); 1173throw new PackagingException(NuGetLogCode.NU5029, Strings.InvalidNuspecProperties);
src\nuget-client\src\NuGet.Core\NuGet.Build.Tasks\Common\MSBuildLogger.cs (6)
158if (logMessage.Code > NuGetLogCode.Undefined) 162Enum.GetName(typeof(NuGetLogCode), logMessage.Code), 163Enum.GetName(typeof(NuGetLogCode), logMessage.Code), 182if (logMessage.Code > NuGetLogCode.Undefined) 186Enum.GetName(typeof(NuGetLogCode), logMessage.Code), 187Enum.GetName(typeof(NuGetLogCode), logMessage.Code),
NuGet.CommandLine.XPlat (4)
Commands\Package\Update\PackageUpdateCommandRunner.cs (2)
148.Where(log => log.Code >= NuGetLogCode.NU1901 && log.Code <= NuGetLogCode.NU1904 && !string.IsNullOrEmpty(log.LibraryId))
Commands\Signing\SignCommand.cs (2)
204logger.Log(LogMessage.CreateWarning(NuGetLogCode.NU3002, Strings.SignCommandNoTimestamperWarning)); 283string message = string.Format(CultureInfo.CurrentCulture, Strings.SignCommandInvalidCertificateFingerprint, NuGetLogCode.NU3043);
NuGet.Commands (176)
CommandRunners\PackCommandRunner.cs (12)
128NuGetLogCode.NU5052)); 220NuGetLogCode.NU5001, 427NuGetLogCode.NU5004, 500NuGetLogCode.NU5009, string.Format(CultureInfo.CurrentCulture, Strings.Error_CannotFindMsbuild)); 519NuGetLogCode.NU5114)); 616NuGetLogCode.NU5003, 688NuGetLogCode.NU5119)); 772NuGetLogCode.NU5005, 958throw new PackagingException(NuGetLogCode.NU5002, Strings.Error_InputFileNotSpecified); 982throw new PackagingException(NuGetLogCode.NU5002, Strings.Error_InputFileNotSpecified); 1020NuGetLogCode.NU5016, 1050NuGetLogCode.NU5016,
MSBuildProjectFactory.cs (3)
180packageFile.Target), NuGetLogCode.NU5118)); 246throw new PackagingException(NuGetLogCode.NU5020, string.Format(CultureInfo.CurrentCulture, Strings.Error_EmptySourceFilePath)); 251throw new PackagingException(NuGetLogCode.NU5021, string.Format(CultureInfo.CurrentCulture, Strings.Error_EmptySourceFileProjectDirectory, sourcePath));
PackCommand\Logging\PackageSpecificWarningProperties.cs (7)
22internal IDictionary<NuGetLogCode, IDictionary<string, ISet<NuGetFramework>>> Properties { get; private set; } 29public static PackageSpecificWarningProperties CreatePackageSpecificWarningProperties(IDictionary<string, HashSet<(NuGetLogCode, NuGetFramework)>> noWarnProperties) 39foreach (KeyValuePair<string, HashSet<(NuGetLogCode, NuGetFramework)>> packageNoWarnProperty in noWarnProperties) 43foreach ((NuGetLogCode nuGetLogCode, NuGetFramework nuGetFramework) propertyPair in packageNoWarnProperty.Value) 58internal void Add(NuGetLogCode code, string libraryId, NuGetFramework framework) 60Properties ??= new Dictionary<NuGetLogCode, IDictionary<string, ISet<NuGetFramework>>>(); 84internal bool Contains(NuGetLogCode code, string libraryId, NuGetFramework framework)
RestoreCommand\CompatibilityChecker.cs (6)
95await _log.LogAsync(GetErrorMessage(NuGetLogCode.NU1201, issue, graph)); 136await _log.LogAsync(GetErrorMessage(NuGetLogCode.NU1202, issue, graph)); 147await _log.LogAsync(GetErrorMessage(NuGetLogCode.NU1213, issue, graph)); 222await _log.LogAsync(GetErrorMessage(NuGetLogCode.NU1203, issue, graph)); 233private static RestoreLogMessage GetErrorMessage(NuGetLogCode logCode, CompatibilityIssue issue, RestoreTargetGraph graph) 347await _log.LogAsync(GetErrorMessage(NuGetLogCode.NU1212, issue, graph));
RestoreCommand\DependencyGraphResolver.cs (1)
274await _logger.LogAsync(RestoreLogMessage.CreateWarning(NuGetLogCode.NU1502, string.Format(CultureInfo.CurrentCulture, Strings.Log_UnknownCompatibilityProfile, profile.Key)));
RestoreCommand\DependencyGraphResolver.DependencyGraphItem.cs (1)
178logger.Log(RestoreLogMessage.CreateWarning(NuGetLogCode.NU1511, string.Format(CultureInfo.CurrentCulture, Strings.Error_RestorePruningProjectReference, dependency.Name), dependency.Name,
RestoreCommand\Diagnostics\UnexpectedDependencyMessages.cs (7)
94NuGetLogCode code; 109code = NuGetLogCode.NU1602; 120code = NuGetLogCode.NU1603; 170messages.Add(RestoreLogMessage.CreateWarning(NuGetLogCode.NU1601, message, match.Key.Name, graphName)); 188code: NuGetLogCode.NU1604, 204code: NuGetLogCode.NU1604, 298messages.Add(RestoreLogMessage.CreateWarning(NuGetLogCode.NU1608, message, dependencyId, graph.TargetGraphName));
RestoreCommand\Diagnostics\UnresolvedMessages.cs (8)
86var code = NuGetLogCode.NU1100; 101code = NuGetLogCode.NU1105; 107code = NuGetLogCode.NU1104; 120code = NuGetLogCode.NU1101; 145code = NuGetLogCode.NU1103; 150code = NuGetLogCode.NU1102; 190code = NuGetLogCode.NU1100;
RestoreCommand\LockFileBuilder.cs (3)
276NuGetLogCode.NU1701, 300NuGetLogCode.NU1703, 572NuGetLogCode.NU1000,
RestoreCommand\Logging\PackageSpecificWarningProperties.cs (7)
25public IDictionary<NuGetLogCode, IDictionary<string, ISet<string>>> Properties { get; private set; } 79public void Add(NuGetLogCode code, string libraryId, string framework) 81Properties ??= new Dictionary<NuGetLogCode, IDictionary<string, ISet<string>>>(); 104public void AddRangeOfCodes(IEnumerable<NuGetLogCode> codes, string libraryId, string framework) 106foreach (var code in codes.NoAllocEnumerate()) 118public void AddRangeOfFrameworks(NuGetLogCode code, string libraryId, IEnumerable<string> frameworks) 133public bool Contains(NuGetLogCode code, string libraryId, string framework)
RestoreCommand\Logging\TransitiveNoWarnUtils.cs (56)
87HashSet<NuGetLogCode> parentProjectWideNoWarn, 88Dictionary<string, HashSet<NuGetLogCode>> parentPackageSpecificNoWarn, 95var packageNoWarn = new Dictionary<string, HashSet<NuGetLogCode>>(StringComparer.OrdinalIgnoreCase); 108HashSet<NuGetLogCode> nodeProjectWideNoWarn = null; 109Dictionary<string, HashSet<NuGetLogCode>> nodePackageSpecificNoWarn = null; 320public static HashSet<NuGetLogCode> ExtractPathNoWarnProperties( 336public static HashSet<NuGetLogCode> MergeCodes( 337HashSet<NuGetLogCode> first, 338HashSet<NuGetLogCode> second) 340HashSet<NuGetLogCode> result = null; 364result = new HashSet<NuGetLogCode>(first.Concat(second)); 379public static Dictionary<string, HashSet<NuGetLogCode>> MergePackageSpecificNoWarn( 380Dictionary<string, HashSet<NuGetLogCode>> first, 381Dictionary<string, HashSet<NuGetLogCode>> second) 398merged = new Dictionary<string, HashSet<NuGetLogCode>>(StringComparer.OrdinalIgnoreCase); 445var code = codePair.Key; 462var code = codePair.Key; 536public static Dictionary<string, Dictionary<string, HashSet<NuGetLogCode>>> ExtractPackageSpecificNoWarnPerFramework( 539Dictionary<string, Dictionary<string, HashSet<NuGetLogCode>>> result = null; 543result = new Dictionary<string, Dictionary<string, HashSet<NuGetLogCode>>>(StringComparer.OrdinalIgnoreCase); 547var code = codePair.Key; 559frameworkCollection = new Dictionary<string, HashSet<NuGetLogCode>>(StringComparer.OrdinalIgnoreCase); 566codes = new HashSet<NuGetLogCode>(); 583public static Dictionary<string, HashSet<NuGetLogCode>> ExtractPackageSpecificNoWarnForFramework( 587Dictionary<string, HashSet<NuGetLogCode>> result = null; 591result = new Dictionary<string, HashSet<NuGetLogCode>>(StringComparer.OrdinalIgnoreCase); 595var code = codePair.Key; 607codes = new HashSet<NuGetLogCode>(); 634public DependencyNode(string id, bool isProject, HashSet<NuGetLogCode> projectWideNoWarn, Dictionary<string, HashSet<NuGetLogCode>> packageSpecificNoWarn) 708public HashSet<NuGetLogCode> ProjectWide { get; } 713public Dictionary<string, HashSet<NuGetLogCode>> PackageSpecific { get; } 717HashSet<NuGetLogCode> projectWide, 718Dictionary<string, HashSet<NuGetLogCode>> packageSpecific) 774Dictionary<string, HashSet<NuGetLogCode>> thisPackages = PackageSpecific; 775Dictionary<string, HashSet<NuGetLogCode>> otherPackages = other.PackageSpecific; 778Dictionary<string, HashSet<NuGetLogCode>> packages = null; 781packages = new Dictionary<string, HashSet<NuGetLogCode>>(StringComparer.OrdinalIgnoreCase); 783foreach (KeyValuePair<string, HashSet<NuGetLogCode>> pair in thisPackages) 787HashSet<NuGetLogCode> intersect = Intersect(pair.Value, otherCodes); 801HashSet<NuGetLogCode> projectWide = Intersect(ProjectWide, other.ProjectWide); 823Dictionary<string, HashSet<NuGetLogCode>> package = PackageSpecific; 824Dictionary<string, HashSet<NuGetLogCode>> otherPackage = other.PackageSpecific; 833foreach (KeyValuePair<string, HashSet<NuGetLogCode>> pair in otherPackage) 863HashSet<NuGetLogCode> projectWide, 864Dictionary<string, HashSet<NuGetLogCode>> packageSpecific) 882HashSet<NuGetLogCode> mergedProjectWideNoWarn = MergeCodes(ProjectWide, other?.ProjectWide); 883Dictionary<string, HashSet<NuGetLogCode>> mergedPackageSpecificNoWarn = MergePackageSpecificNoWarn(PackageSpecific, other?.PackageSpecific); 893internal HashSet<NuGetLogCode> ExtractPathNoWarnProperties( 896var result = new HashSet<NuGetLogCode>(); 912private static bool IsSubSetOfWithNullCheck(HashSet<NuGetLogCode> parent, HashSet<NuGetLogCode> other) 934private static HashSet<NuGetLogCode> Intersect(HashSet<NuGetLogCode> first, HashSet<NuGetLogCode> second) 952var result = new HashSet<NuGetLogCode>(first);
RestoreCommand\Logging\WarningPropertiesCollection.cs (1)
168if ((warningProperties.AllWarningsAsErrors && message.Code > NuGetLogCode.Undefined && !warningProperties.WarningsNotAsErrors.Contains(message.Code)) ||
RestoreCommand\ProjectRestoreCommand.cs (3)
198NuGetLogCode.NU1007, 209NuGetLogCode.NU1007, 320_logger.Log(RestoreLogMessage.CreateError(NuGetLogCode.NU1106, message, conflict.Name, graph.TargetGraphName));
RestoreCommand\RestoreCommand.cs (32)
537NuGetLogCode.NU1302, 545NuGetLogCode.NU1803, 731var errorCodes = ConcatAsString(new HashSet<NuGetLogCode>(logs.Where(l => l.Level == LogLevel.Error).Select(l => l.Code))); 732var warningCodes = ConcatAsString(new HashSet<NuGetLogCode>(logs.Where(l => l.Level == LogLevel.Warning).Select(l => l.Code))); 733var suppressedWarningCodes = ConcatAsString(new HashSet<NuGetLogCode>(_logger.SuppressedWarnings.Select(l => l.Code))); 862NuGetLogCode.NU1012, 899NuGetLogCode.NU1019, 908NuGetLogCode.NU1019, 915NuGetLogCode.NU1019, 1013NuGetLogCode.NU1510, 1106var diagnostic = RestoreLogMessage.CreateError(NuGetLogCode.NU1015, string.Format(CultureInfo.InvariantCulture, Strings.Error_PackageReference_NoVersion, string.Join(", ", packagesList))); 1127NuGetLogCode.NU1507, 1204NuGetLogCode.NU1008, 1217NuGetLogCode.NU1009, 1230NuGetLogCode.NU1010, 1243NuGetLogCode.NU1011, 1258NuGetLogCode.NU1013, 1275NuGetLogCode.NU1016, 1357_logger.LogAsync(RestoreLogMessage.CreateError(NuGetLogCode.NU1403, errorMessageBuilder.ToString())); 1394await _request.Log.LogAsync(RestoreLogMessage.CreateError(NuGetLogCode.NU1005, message)); 1411await _request.Log.LogAsync(RestoreLogMessage.CreateWarning(NuGetLogCode.NU1512, Strings.Warning_RestoreLockedModeAndForceEvaluate)); 1457var message = RestoreLogMessage.CreateError(NuGetLogCode.NU1004, 1658await logger.LogAsync(RestoreLogMessage.CreateError(NuGetLogCode.NU1108, text, cycle.Key?.Name, graph.TargetGraphName)); 1702await logger.LogAsync(RestoreLogMessage.CreateError(NuGetLogCode.NU1107, message, versionConflict.Selected.Key.Name, graph.TargetGraphName)); 1754messages.Add(RestoreLogMessage.CreateError(NuGetLogCode.NU1109, message, downgraded.Key.Name, graph.TargetGraphName)); 1758messages.Add(RestoreLogMessage.CreateWarning(NuGetLogCode.NU1605, message, downgraded.Key.Name, graph.TargetGraphName)); 1837await _logger.LogAsync(RestoreLogMessage.CreateError(NuGetLogCode.NU1001, message)); 1945await _logger.LogAsync(RestoreLogMessage.CreateWarning(NuGetLogCode.NU1502, message)); 2014await _logger.LogAsync(RestoreLogMessage.CreateError(NuGetLogCode.NU1001, message)); 2078_logger.Log(RestoreLogMessage.CreateError(NuGetLogCode.NU1017, ex.Message)); 2109await _logger.LogAsync(RestoreLogMessage.CreateWarning(NuGetLogCode.NU1502, message)); 2185await logger.LogAsync(RestoreLogMessage.CreateError(NuGetLogCode.NU1018, message));
RestoreCommand\RestoreRunner.cs (1)
209await restoreContext.Log.LogAsync(RestoreLogMessage.CreateWarning(NuGetLogCode.NU1501, message));
RestoreCommand\SourceRepositoryDependencyProvider.cs (3)
669await logger.LogAsync(RestoreLogMessage.CreateWarning(NuGetLogCode.NU1801, e.Message)); 689await logger.LogAsync(RestoreLogMessage.CreateError(NuGetLogCode.NU1302, ExceptionUtilities.DisplayMessage(httpSourceException))); 694await logger.LogAsync(RestoreLogMessage.CreateError(NuGetLogCode.NU1301, ExceptionUtilities.DisplayMessage(e)));
RestoreCommand\Utility\AuditUtility.cs (12)
252RestoreLogMessage logMessage = RestoreLogMessage.CreateWarning(NuGetLogCode.NU1900, messageText); 281(string severityLabel, NuGetLogCode logCode) = GetSeverityLabelAndCode(vulnerability.Severity); 355private static (string severityLabel, NuGetLogCode code) GetSeverityLabelAndCode(PackageVulnerabilitySeverity severity) 360return (Strings.Vulnerability_Severity_Low, NuGetLogCode.NU1901); 362return (Strings.Vulnerability_Severity_Moderate, NuGetLogCode.NU1902); 364return (Strings.Vulnerability_Severity_High, NuGetLogCode.NU1903); 366return (Strings.Vulnerability_Severity_Critical, NuGetLogCode.NU1904); 368return (Strings.Vulnerability_Severity_unknown, NuGetLogCode.NU1900); 466RestoreLogMessage logMessage = RestoreLogMessage.CreateWarning(NuGetLogCode.NU1905, message); 507RestoreLogMessage message = RestoreLogMessage.CreateError(NuGetLogCode.NU1014, messageText); 533RestoreLogMessage message = RestoreLogMessage.CreateError(NuGetLogCode.NU1014, messageText); 550RestoreLogMessage message = RestoreLogMessage.CreateError(NuGetLogCode.NU1014, messageText);
RestoreCommand\Utility\MSBuildRestoreUtility.cs (3)
363var restoreLogMessage = RestoreLogMessage.CreateError(NuGetLogCode.NU1105, message); 485var message = LogMessage.CreateError(NuGetLogCode.NU1002, text); 501var message = RestoreLogMessage.CreateWarning(NuGetLogCode.NU1503, text);
RestoreCommand\Utility\NoOpRestoreUtilities.cs (1)
160request.Log.Log(RestoreLogMessage.CreateWarning(NuGetLogCode.NU1802,
RestoreCommand\Utility\PackageSpecFactory.cs (1)
657ImmutableArray<NuGetLogCode> noWarn = MSBuildStringUtility.GetNuGetLogCodes(packageReferenceItem.GetMetadata("NoWarn"));
RestoreCommand\Utility\SpecValidationUtility.cs (1)
162logger.Log(new RestoreLogMessage(LogLevel.Error, NuGetLogCode.NU1105, message) { FilePath = spec.FilePath, ProjectPath = spec.FilePath });
SignCommand\CertificateProvider.cs (4)
72LogMessage.CreateError(NuGetLogCode.NU3001, 81LogMessage.CreateError(NuGetLogCode.NU3001, 95LogMessage.CreateError(NuGetLogCode.NU3001, 107LogMessage.CreateError(NuGetLogCode.NU3001,
SignCommand\SignCommandRunner.cs (2)
226LogMessage.CreateError(NuGetLogCode.NU3001, 235LogMessage.CreateError(NuGetLogCode.NU3001,
Utility\AssetTargetFallbackUtility.cs (1)
33var error = RestoreLogMessage.CreateError(NuGetLogCode.NU1003, Strings.Error_InvalidATF);
NuGet.Common (37)
CommandLineArgumentCombinationException.cs (1)
15_logMessage = LogMessage.CreateError(NuGetLogCode.NU1000, message);
Errors\ILogMessage.cs (1)
24NuGetLogCode Code { get; set; }
Errors\LogMessage.cs (4)
15public NuGetLogCode Code { get; set; } 20public LogMessage(LogLevel level, string message, NuGetLogCode code) 37public static LogMessage CreateError(NuGetLogCode code, string message) 42public static LogMessage CreateWarning(NuGetLogCode code, string message)
Errors\PackagingLogMessage.cs (7)
12public NuGetLogCode Code { get; set; } 31private PackagingLogMessage(LogLevel logLevel, NuGetLogCode logCode, string message) 42private PackagingLogMessage(LogLevel logLevel, NuGetLogCode logCode, string message, string? libraryId, NuGetFramework? framework) 53: this(logLevel, NuGetLogCode.Undefined, message) { } 60public static PackagingLogMessage CreateError(string message, NuGetLogCode code) 65public static PackagingLogMessage CreateWarning(string message, NuGetLogCode code) 75public static PackagingLogMessage CreateWarning(string message, NuGetLogCode code, string? libraryId, NuGetFramework? framework)
Errors\RestoreLogMessage.cs (14)
12public NuGetLogCode Code { get; set; } 27public RestoreLogMessage(LogLevel logLevel, NuGetLogCode errorCode, 49public RestoreLogMessage(LogLevel logLevel, NuGetLogCode errorCode, 55public RestoreLogMessage(LogLevel logLevel, NuGetLogCode errorCode, string errorString) 69NuGetLogCode code, 89NuGetLogCode code, 102NuGetLogCode code, 114NuGetLogCode code, 124NuGetLogCode code, 134NuGetLogCode code, 151private static NuGetLogCode GetDefaultLogCode(LogLevel logLevel) 156return NuGetLogCode.NU1000; 158return NuGetLogCode.NU1500; 160return NuGetLogCode.Undefined;
Logging\LoggingExtensions.cs (4)
19if (message.Code > NuGetLogCode.Undefined && message.Code.TryGetName(out var codeString)) 34public static string? GetName(this NuGetLogCode code) 36return Enum.GetName(typeof(NuGetLogCode), code); 45public static bool TryGetName(this NuGetLogCode code, [NotNullWhen(true)] out string? codeString)
MsBuildStringUtility.cs (6)
93/// <returns>An <see cref="IList{T}" /> containing the <see cref="NuGetLogCode" /> values that were successfully parsed from the specified string.</returns> 94public static ImmutableArray<NuGetLogCode> GetNuGetLogCodes(string? s) 104NuGetLogCode[]? logCodes = null; 110Enum.TryParse(value: split[i], ignoreCase: true, out NuGetLogCode logCode)) 112logCodes ??= ArrayPool<NuGetLogCode>.Shared.Rent(split.Length); 124ArrayPool<NuGetLogCode>.Shared.Return(logCodes);
NuGet.Configuration (1)
Settings\Settings.cs (1)
773Resources.ShowError_ConfigHasInvalidPackageSource, NuGetLogCode.NU1006, value, ex.Message),
NuGet.LibraryModel (5)
LibraryDependency.cs (5)
16private ImmutableArray<NuGetLogCode> _noWarn = []; 24public ImmutableArray<NuGetLogCode> NoWarn 29_noWarn = value.IsDefault ? ImmutableArray<NuGetLogCode>.Empty : value; 79ImmutableArray<NuGetLogCode> noWarn, 129foreach (var item in NoWarn)
NuGet.PackageManagement (13)
Audit\AuditChecker.cs (9)
78var logMessage = RestoreLogMessage.CreateWarning(NuGetLogCode.NU1900, messageText); 190RestoreLogMessage restoreLogMessage = RestoreLogMessage.CreateWarning(NuGetLogCode.NU1905, message); 257(var severityLabel, NuGetLogCode logCode) = GetSeverityLabelAndCode(vulnerability.Severity); 371internal static (string severityLabel, NuGetLogCode code) GetSeverityLabelAndCode(PackageVulnerabilitySeverity severity) 376return ("low", NuGetLogCode.NU1901); 378return ("moderate", NuGetLogCode.NU1902); 380return ("high", NuGetLogCode.NU1903); 382return ("critical", NuGetLogCode.NU1904); 384return ("unknown", NuGetLogCode.NU1900);
NuGetPackageManager.cs (1)
2718unwrappedException = new SignatureException(NuGetLogCode.NU3000, errorMessage, ex.PackageIdentity);
Utility\PackagesConfigLockFileUtility.cs (3)
104var log = RestoreLogMessage.CreateError(NuGetLogCode.NU1005, message); 140var log = RestoreLogMessage.CreateError(NuGetLogCode.NU1403, message); 152var log = RestoreLogMessage.CreateError(NuGetLogCode.NU1004, Strings.Error_RestoreInLockedModePackagesConfig);
NuGet.Packaging (186)
Core\PackagingException.cs (4)
16_logMessage = PackagingLogMessage.CreateError(message, NuGetLogCode.NU5000); 19public PackagingException(NuGetLogCode logCode, string message) 25public PackagingException(NuGetLogCode logCode, string message, Exception innerException) 34_logMessage = PackagingLogMessage.CreateError(message, NuGetLogCode.NU5000);
Exceptions\MinClientVersionException.cs (1)
21return LogMessage.CreateError(NuGetLogCode.NU1401, Message);
Exceptions\UnsafePackageEntryException.cs (1)
18return LogMessage.CreateError(NuGetLogCode.NU1402, Message);
PackageArchiveReader.cs (1)
453throw new SignatureException(NuGetLogCode.NU3008, Strings.SignaturePackageIntegrityFailure, GetIdentity());
PackageCreation\Authoring\ManifestReader.cs (3)
206throw new PackagingException(NuGetLogCode.NU5034, string.Format( 226throw new PackagingException(NuGetLogCode.NU5032, e.Message); 230throw new PackagingException(NuGetLogCode.NU5034, string.Format(
PackageCreation\Authoring\PackageBuilder.cs (23)
91NuGetLogCode.NU5008, 180NuGetLogCode.NU5502, 332throw new PackagingException(NuGetLogCode.NU5017, NuGetResources.CannotCreateEmptyPackage); 478throw new PackagingException(NuGetLogCode.NU1012, string.Format(CultureInfo.CurrentCulture, Strings.MissingTargetPlatformVersionsFromDependencyGroups, string.Join(", ", frameworksMissingPlatformVersion.OrderBy(str => str)))); 501throw new PackagingException(NuGetLogCode.NU1012, string.Format(CultureInfo.CurrentCulture, Strings.MissingTargetPlatformVersionsFromReferenceGroups, string.Join(", ", frameworksMissingPlatformVersion.OrderBy(str => str)))); 515throw new PackagingException(NuGetLogCode.NU5018, string.Format(CultureInfo.CurrentCulture, NuGetResources.Manifest_InvalidReference, reference)); 530throw new PackagingException(NuGetLogCode.NU1012, string.Format(CultureInfo.CurrentCulture, Strings.MissingTargetPlatformVersionsFromFrameworkAssemblyReferences, string.Join(", ", frameworksMissingPlatformVersion.OrderBy(str => str)))); 540throw new PackagingException(NuGetLogCode.NU1012, string.Format(CultureInfo.CurrentCulture, Strings.MissingTargetPlatformVersionsFromFrameworkAssemblyGroups, string.Join(", ", frameworksMissingPlatformVersion.OrderBy(str => str)))); 590throw new PackagingException(NuGetLogCode.NU5050, string.Format(CultureInfo.CurrentCulture, NuGetResources.FoundDuplicateFile, string.Join(", ", duplicates))); 604throw new PackagingException(NuGetLogCode.NU5031, string.Format(CultureInfo.CurrentCulture, NuGetResources.Manifest_LicenseFileExtensionIsInvalid, licenseMetadata.License)); 619throw new PackagingException(NuGetLogCode.NU5030, errorMessage); 642NuGetLogCode.NU5045, 661throw new PackagingException(NuGetLogCode.NU5046, errorMessage); 674throw new PackagingException(Common.NuGetLogCode.NU5047, NuGetResources.IconMaxFileSizeExceeded); 679throw new PackagingException(Common.NuGetLogCode.NU5047, NuGetResources.IconErrorEmpty); 686NuGetLogCode.NU5046, 746throw new PackagingException(NuGetLogCode.NU1012, string.Format(CultureInfo.CurrentCulture, Strings.MissingTargetPlatformVersionsFromIncludedFiles, string.Join(", ", itemsWithFrameworkMissingPlatformVersion.OrderBy(str => str)))); 767NuGetLogCode.NU5038, 782NuGetLogCode.NU5039, 799NuGetLogCode.NU5040, 807NuGetLogCode.NU5041, 982_logger?.Log(PackagingLogMessage.CreateWarning(StringFormatter.ZipFileTimeStampModifiedWarning(warningMessageString), NuGetLogCode.NU5132)); 1007throw new PackagingException(NuGetLogCode.NU5019,
PackageExtractor.cs (1)
1140if (message.Code == NuGetLogCode.NU3004)
PackageFolderReader.cs (1)
76throw new PackagingException(NuGetLogCode.NU5037, message.ToString());
PackageReaderBase.cs (1)
539throw new PackagingException(NuGetLogCode.NU5037, Strings.Error_MissingNuspecFile);
Rules\AccidentallyCompatibleWithAllFrameworksRule.cs (1)
92NuGetLogCode.NU5127));
Rules\ContentFolderInPackageReferenceProjectRule.cs (1)
37string.Format(CultureInfo.CurrentCulture, MessageFormat), NuGetLogCode.NU5121));
Rules\DefaultManifestValuesRule.cs (1)
85NuGetLogCode.NU5102);
Rules\DependenciesGroupsForEachTFMRule.cs (2)
44issues.Add(PackagingLogMessage.CreateWarning(noExactMatchString, NuGetLogCode.NU5128)); 49issues.Add(PackagingLogMessage.CreateWarning(compatMatchString, NuGetLogCode.NU5130));
Rules\IconUrlDeprecationWarning.cs (1)
30NuGetLogCode.NU5048);
Rules\InitScriptNotUnderToolsRule.cs (1)
37NuGetLogCode.NU5107);
Rules\InstallScriptInPackageReferenceProjectRule.cs (1)
31string.Format(CultureInfo.CurrentCulture, MessageFormat), NuGetLogCode.NU5120));
Rules\InvalidFrameworkFolderRule.cs (1)
44NuGetLogCode.NU5103);
Rules\InvalidPlaceholderFileRule.cs (1)
41NuGetLogCode.NU5109);
Rules\InvalidPrereleaseDependencyRule.cs (1)
54NuGetLogCode.NU5104,
Rules\InvalidUndottedFrameworkRule.cs (5)
71PackagingLogMessage.CreateWarning(string.Format(CultureInfo.CurrentCulture, AnalysisResources.InvalidUndottedFrameworkWarning), NuGetLogCode.NU5501) 106NuGetLogCode.NU5501 135NuGetLogCode.NU5501 182NuGetLogCode.NU5501 250NuGetLogCode.NU5501
Rules\LicenseUrlDeprecationWarning.cs (1)
31NuGetLogCode.NU5125);
Rules\MisplaceAssemblyOutsideLibRule.cs (1)
56NuGetLogCode.NU5100);
Rules\MisplacedAssemblyUnderLibRule.cs (1)
42NuGetLogCode.NU5101);
Rules\MisplacedScriptFileRule.cs (1)
45NuGetLogCode.NU5110);
Rules\MisplacedTransformFileRule.cs (1)
53NuGetLogCode.NU5108);
Rules\PathTooLongRule.cs (1)
37NuGetLogCode.NU5123);
Rules\ReferencesInNuspecMatchRefAssetsRule.cs (1)
159issues.Add(PackagingLogMessage.CreateWarning(message.ToString(), NuGetLogCode.NU5131));
Rules\UnrecognizedLicenseIdentifierRule.cs (1)
46NuGetLogCode.NU5124));
Rules\UnrecognizedScriptFileRule.cs (1)
49NuGetLogCode.NU5111);
Rules\UnspecifiedDependencyVersionRule.cs (1)
38NuGetLogCode.NU5112);
Rules\UpholdBuildConventionRule.cs (1)
55var message = PackagingLogMessage.CreateWarning(warningMessage.ToString(), NuGetLogCode.NU5129);
Rules\WinRTNameIsObsoleteRule.cs (1)
41NuGetLogCode.NU5106);
Rules\XdtTransformsInPackageReferenceProjectRule.cs (1)
46NuGetLogCode.NU5122);
Signing\Archive\SignedPackageArchiveIOUtility.cs (6)
253throw new SignatureException(NuGetLogCode.NU3005, Strings.MultiplePackageSignatureFiles); 280throw new SignatureException(NuGetLogCode.NU3005, Strings.NoPackageSignatureFile); 424errorCode: NuGetLogCode.NU3005, 444var signatureEntryErrorCode = NuGetLogCode.NU3005; 489NuGetLogCode errorCode,
Signing\Archive\SignedPackageArchiveUtility.cs (2)
132throw new SignatureException(NuGetLogCode.NU3005, Strings.InvalidPackageSignatureFile); 456throw new SignatureException(NuGetLogCode.NU3003, Strings.SignedPackageNotSignedOnVerify);
Signing\Authoring\X509SignatureProvider.cs (2)
146throw new SignatureException(NuGetLogCode.NU3001, exceptionBuilder.ToString()); 182throw new SignatureException(NuGetLogCode.NU3001, exceptionBuilder.ToString());
Signing\Cms\ManagedCmsWrapper.cs (5)
28throw new SignatureException(NuGetLogCode.NU3009, Strings.Error_NotOnePrimarySignature); 38throw new SignatureException(NuGetLogCode.NU3009, Strings.Error_NotOnePrimarySignature); 60throw new SignatureException(NuGetLogCode.NU3009, Strings.Error_NotOnePrimarySignature); 74throw new SignatureException(NuGetLogCode.NU3009, Strings.Error_NotOnePrimarySignature); 92throw new SignatureException(NuGetLogCode.NU3009, Strings.Error_NotOnePrimarySignature);
Signing\Content\SignatureContent.cs (1)
179throw new SignatureException(NuGetLogCode.NU3007, Strings.UnsupportedSignatureFormatVersion);
Signing\Package\SignedPackageArchive.cs (1)
52throw new SignatureException(NuGetLogCode.NU3001, Strings.SignedPackageAlreadySigned);
Signing\SignatureException.cs (5)
22public NuGetLogCode Code { get; } 24public SignatureException(NuGetLogCode code, string message) 30public SignatureException(NuGetLogCode code, string message, Exception innerException) 37: this(NuGetLogCode.NU3000, message) 48public SignatureException(NuGetLogCode code, string message, PackageIdentity package)
Signing\SignatureLog.cs (8)
19public NuGetLogCode Code { get; set; } 29private SignatureLog(LogLevel level, NuGetLogCode code, string message) 40return new SignatureLog(LogLevel.Minimal, NuGetLogCode.Undefined, message); 46return new SignatureLog(LogLevel.Information, NuGetLogCode.Undefined, message); 52return new SignatureLog(LogLevel.Verbose, NuGetLogCode.Undefined, message); 58return new SignatureLog(LogLevel.Debug, NuGetLogCode.Undefined, message); 61public static SignatureLog Issue(bool fatal, NuGetLogCode code, string message) 69public static SignatureLog Error(NuGetLogCode code, string message)
Signing\Signatures\PrimarySignature.cs (2)
59throw new SignatureException(NuGetLogCode.NU3009, Strings.Error_NotOnePrimarySignature); 125throw new SignatureException(NuGetLogCode.NU3011, Strings.InvalidPrimarySignature);
Signing\Signatures\RepositoryCountersignature.cs (3)
54throw new SignatureException(NuGetLogCode.NU3032, Strings.Error_NotOneRepositoryCounterSignature); 59throw new SignatureException(NuGetLogCode.NU3033, Strings.Error_RepositorySignatureMustNotHaveARepositoryCountersignature); 86throw new SignatureException(NuGetLogCode.NU3031, Strings.InvalidRepositoryCountersignature);
Signing\Signatures\Signature.cs (11)
93issues.Add(SignatureLog.Issue(!settings.AllowNoTimestamp, NuGetLogCode.NU3027, Strings.ErrorNoTimestamp)); 103issues.Add(SignatureLog.Error(NuGetLogCode.NU3000, Strings.ErrorMultipleTimestamps)); 150issues.Add(SignatureLog.Issue(!settings.AllowIllegal, NuGetLogCode.NU3010, string.Format(CultureInfo.CurrentCulture, Strings.Verify_ErrorNoCertificate, FriendlyName))); 170issues.Add(SignatureLog.Issue(!settings.AllowIllegal, NuGetLogCode.NU3012, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_SignatureVerificationFailed, FriendlyName))); 227issues.Add(SignatureLog.Issue(!settings.AllowIllegal, NuGetLogCode.NU3012, string.Format(CultureInfo.CurrentCulture, Strings.VerifyChainBuildingIssue, FriendlyName, message))); 239issues.Add(SignatureLog.Error(NuGetLogCode.NU3012, string.Format(CultureInfo.CurrentCulture, Strings.VerifyChainBuildingIssue, FriendlyName, messages.First()))); 251issues.Add(SignatureLog.Issue(!settings.AllowUntrusted, NuGetLogCode.NU3018, string.Format(CultureInfo.CurrentCulture, Strings.VerifyChainBuildingIssue_UntrustedRoot, FriendlyName))); 290issues.Add(SignatureLog.Issue(!settings.AllowUnknownRevocation, NuGetLogCode.NU3018, string.Format(CultureInfo.CurrentCulture, Strings.VerifyChainBuildingIssue, FriendlyName, Strings.VerifyCertTrustOfflineWhileRevocationModeOnline))); 295issues.Add(SignatureLog.Issue(!settings.AllowUnknownRevocation, NuGetLogCode.NU3018, unknownRevocationMessage)); 328NuGetLogCode.NU3037, 414throw new SignatureException(NuGetLogCode.NU3029, Strings.InvalidTimestampSignature);
Signing\Timestamp\Rfc3161TimestampProvider.cs (9)
149throw new TimestampException(NuGetLogCode.NU3021, Strings.SignError_TimestampSignatureValidationFailed, e); 154throw new TimestampException(NuGetLogCode.NU3020, Strings.SignError_TimestampNoCertificate); 168throw new TimestampException(NuGetLogCode.NU3022, errorMessage); 173throw new TimestampException(NuGetLogCode.NU3023, Strings.SignError_TimestampCertificateFailsPublicKeyLengthRequirement); 187throw new TimestampException(NuGetLogCode.NU3024, errorMessage); 192throw new TimestampException(NuGetLogCode.NU3025, Strings.SignError_TimestampNotYetValid); 197throw new TimestampException(NuGetLogCode.NU3036, Strings.SignError_TimestampGeneralizedTimeInvalid); 206throw new TimestampException(NuGetLogCode.NU3026, Strings.TimestampFailureNonceMismatch); 211throw new TimestampException(NuGetLogCode.NU3019, Strings.SignError_TimestampIntegrityCheckFailed);
Signing\Timestamp\Timestamp.cs (8)
72throw new TimestampException(NuGetLogCode.NU3021, Strings.VerifyError_TimestampSignatureValidationFailed, ex); 84throw new TimestampException(NuGetLogCode.NU3021, Strings.VerifyError_TimestampSignatureValidationFailed); 120issues.Add(SignatureLog.Issue(treatIssueAsError, NuGetLogCode.NU3020, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampNoCertificate, signature.FriendlyName))); 185issues.Add(SignatureLog.Issue(treatIssueAsError, NuGetLogCode.NU3028, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampVerifyChainBuildingIssue, signature.FriendlyName, message))); 200issues.Add(SignatureLog.Error(NuGetLogCode.NU3028, string.Format(CultureInfo.CurrentCulture, Strings.VerifyTimestampChainBuildingIssue_UntrustedRoot, signature.FriendlyName))); 208issues.Add(SignatureLog.Error(NuGetLogCode.NU3028, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampVerifyChainBuildingIssue, signature.FriendlyName, messages!.First()))); 243issues.Add(SignatureLog.Issue(!settings.AllowUnknownRevocation, NuGetLogCode.NU3028, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampVerifyChainBuildingIssue, signature.FriendlyName, Strings.VerifyCertTrustOfflineWhileRevocationModeOnline))); 248issues.Add(SignatureLog.Issue(!settings.AllowUnknownRevocation, NuGetLogCode.NU3028, unknownRevocationMessage));
Signing\Timestamp\TimestampException.cs (3)
19public TimestampException(NuGetLogCode code, string message) 24public TimestampException(NuGetLogCode code, string message, Exception innerException) 30: this(NuGetLogCode.NU3000, message)
Signing\TrustedSigners\TrustedSignersProvider.cs (1)
106NuGetLogCode.NU3040));
Signing\TrustStore\CertificateBundleX509ChainFactory.cs (1)
111logMessage = new LogMessage(LogLevel.Warning, message, NuGetLogCode.NU3042);
Signing\Utility\CertificateChainUtility.cs (3)
109var logCode = certificateType == CertificateType.Timestamp ? NuGetLogCode.NU3028 : NuGetLogCode.NU3018;
Signing\Utility\SignatureUtility.cs (17)
117noCertificate: NuGetLogCode.NU3010, 119invalidSignature: NuGetLogCode.NU3011, 121chainBuildingFailed: NuGetLogCode.NU3018); 174throw new SignatureException(NuGetLogCode.NU3000, Strings.PrimarySignatureHasNoTimestamp); 220throw new SignatureException(NuGetLogCode.NU3000, Strings.RepositoryCountersignatureHasNoTimestamp); 247noCertificate: NuGetLogCode.NU3034, 249invalidSignature: NuGetLogCode.NU3031, 251chainBuildingFailed: NuGetLogCode.NU3035); 336noCertificate: NuGetLogCode.NU3020, 338invalidSignature: NuGetLogCode.NU3021, 340chainBuildingFailed: NuGetLogCode.NU3028); 695internal NuGetLogCode NoCertificate { get; } 697internal NuGetLogCode InvalidSignature { get; } 699internal NuGetLogCode ChainBuildingFailed { get; } 702NuGetLogCode noCertificate, 704NuGetLogCode invalidSignature, 706NuGetLogCode chainBuildingFailed)
Signing\Utility\SigningUtility.cs (9)
35throw new SignatureException(NuGetLogCode.NU3013, Strings.SigningError_CertificateHasUnsupportedSignatureAlgorithm); 40throw new SignatureException(NuGetLogCode.NU3014, Strings.SigningError_CertificateFailsPublicKeyLengthRequirement); 45throw new SignatureException(NuGetLogCode.NU3015, Strings.SigningError_CertificateHasLifetimeSigningEKU); 50throw new SignatureException(NuGetLogCode.NU3017, Strings.SigningError_NotYetValid); 194throw new SignatureException(NuGetLogCode.NU3006, Strings.ErrorZip64NotSupported); 202throw new SignatureException(NuGetLogCode.NU3039, Strings.SigningWouldRequireZip64); 212throw new SignatureException(NuGetLogCode.NU3033, Strings.Error_RepositorySignatureMustNotHaveARepositoryCountersignature); 217throw new SignatureException(NuGetLogCode.NU3032, Strings.SignedPackagePackageAlreadyCountersigned); 225throw new SignatureException(NuGetLogCode.NU3001, Strings.SignedPackageAlreadySigned);
Signing\Utility\VerificationUtility.cs (13)
73issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3013, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_CertificateHasUnsupportedSignatureAlgorithm, signatureFriendlyName))); 79issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3014, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_CertificateFailsPublicKeyLengthRequirement, signatureFriendlyName))); 85issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3015, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_CertificateHasLifetimeSigningEKU, signatureFriendlyName))); 91issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3017, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_CertificateNotYetValid, signatureFriendlyName))); 127issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3021, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampSignatureValidationFailed, signature.FriendlyName))); 134issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3022, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampUnsupportedSignatureAlgorithm, signature.FriendlyName))); 140issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3023, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampCertificateFailsPublicKeyLengthRequirement, signature.FriendlyName))); 146issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3024, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampSignatureUnsupportedDigestAlgorithm, signature.FriendlyName))); 158issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3019, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampIntegrityCheckFailed, signature.FriendlyName))); 165issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3030, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampMessageImprintUnsupportedHashAlgorithm, signature.FriendlyName))); 171issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3025, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampNotYetValid, signature.FriendlyName))); 177issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3036, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampGeneralizedTimeInvalid, signature.FriendlyName))); 183issues.Add(SignatureLog.Issue(treatIssuesAsErrors, NuGetLogCode.NU3020, string.Format(CultureInfo.CurrentCulture, Strings.VerifyError_TimestampNoCertificate, signature.FriendlyName)));
Signing\Verification\AllowListVerificationProvider.cs (2)
46issues.Add(SignatureLog.Error(code: NuGetLogCode.NU3034, message: _emptyListErrorMessage)); 56issues.Add(SignatureLog.Issue(fatal: treatIssuesAsErrors, code: NuGetLogCode.NU3034, message: _noMatchErrorMessage));
Signing\Verification\IntegrityVerificationProvider.cs (2)
40issues.Add(SignatureLog.Error(NuGetLogCode.NU3008, Strings.SignaturePackageIntegrityFailure)); 46issues.Add(SignatureLog.Issue(!settings.AllowIllegal, NuGetLogCode.NU3016, Strings.SignatureFailureInvalidHashAlgorithmOid));
Signing\Verification\PackageSignatureVerifier.cs (2)
76SignatureLog.Issue(!settings.AllowIllegal, NuGetLogCode.NU3003, Strings.ErrorPackageSignatureInvalid), 92var issues = new[] { SignatureLog.Issue(fatal: true, code: NuGetLogCode.NU3004, message: Strings.ErrorPackageNotSigned) };
Signing\Verification\SignatureTrustAndValidityVerificationProvider.cs (5)
130issues = issues.Concat(new[] { SignatureLog.Error(NuGetLogCode.NU3038, Strings.NoRepositoryCountersignature) }); 159issues = issues.Where(log => log.Code != NuGetLogCode.NU3018); 165issues = issues.Where(log => log.Code != NuGetLogCode.NU3037); 175issues = issues.Where(log => log.Code != NuGetLogCode.NU3037); 182issues = issues.Where(log => log.Code != NuGetLogCode.NU3018);
NuGet.ProjectModel (68)
_generated\12\CacheFileSourceGen.GetJsonTypeInfo.g.cs (1)
32if (type == typeof(global::NuGet.Common.NuGetLogCode))
_generated\15\AssetsLogMessageSourceGen.NuGetLogCode.g.cs (9)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Common.NuGetLogCode>? _NuGetLogCode; 21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Common.NuGetLogCode> NuGetLogCode 24get => _NuGetLogCode ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Common.NuGetLogCode>)Options.GetTypeInfo(typeof(global::NuGet.Common.NuGetLogCode)); 27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Common.NuGetLogCode> Create_NuGetLogCode(global::System.Text.Json.JsonSerializerOptions options) 29if (!TryGetTypeInfoForRuntimeCustomConverter<global::NuGet.Common.NuGetLogCode>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Common.NuGetLogCode> jsonTypeInfo)) 31jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<global::NuGet.Common.NuGetLogCode>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.GetEnumConverter<global::NuGet.Common.NuGetLogCode>(options));
_generated\18\AssetsLogMessageSourceGen.AssetsLogMessage.g.cs (9)
34ObjectWithParameterizedConstructorCreator = static args => new global::NuGet.ProjectModel.AssetsLogMessage((global::NuGet.Common.LogLevel)args[0], (global::NuGet.Common.NuGetLogCode)args[1], (string)args[2], (string)args[3], (string)args[4], (string)args[5], (global::System.Collections.Generic.IReadOnlyList<string>)args[6], (int)args[7], (int)args[8], (int)args[9], (int)args[10]), 37ConstructorAttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.AssetsLogMessage).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::NuGet.Common.LogLevel), typeof(global::NuGet.Common.NuGetLogCode), typeof(string), typeof(string), typeof(string), typeof(string), typeof(global::System.Collections.Generic.IReadOnlyList<string>), typeof(int), typeof(int), typeof(int), typeof(int)}, modifiers: null), 55var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::NuGet.Common.NuGetLogCode> 61Converter = (global::System.Text.Json.Serialization.JsonConverter<global::NuGet.Common.NuGetLogCode>)ExpandConverter(typeof(global::NuGet.Common.NuGetLogCode), new global::System.Text.Json.Serialization.JsonStringEnumConverter<global::NuGet.Common.NuGetLogCode>(), options), 70AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.AssetsLogMessage).GetProperty("Code", InstanceMemberBindingFlags, null, typeof(global::NuGet.Common.NuGetLogCode), global::System.Array.Empty<global::System.Type>(), null), 73properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Common.NuGetLogCode>(options, info0); 333ParameterType = typeof(global::NuGet.Common.NuGetLogCode),
_generated\2\CacheFileSourceGen.NuGetLogCode.g.cs (9)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Common.NuGetLogCode>? _NuGetLogCode; 21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Common.NuGetLogCode> NuGetLogCode 24get => _NuGetLogCode ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Common.NuGetLogCode>)Options.GetTypeInfo(typeof(global::NuGet.Common.NuGetLogCode)); 27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Common.NuGetLogCode> Create_NuGetLogCode(global::System.Text.Json.JsonSerializerOptions options) 29if (!TryGetTypeInfoForRuntimeCustomConverter<global::NuGet.Common.NuGetLogCode>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Common.NuGetLogCode> jsonTypeInfo)) 31jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<global::NuGet.Common.NuGetLogCode>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.GetEnumConverter<global::NuGet.Common.NuGetLogCode>(options));
_generated\23\AssetsLogMessageSourceGen.GetJsonTypeInfo.g.cs (1)
28if (type == typeof(global::NuGet.Common.NuGetLogCode))
_generated\5\CacheFileSourceGen.IAssetsLogMessage.g.cs (3)
75var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::NuGet.Common.NuGetLogCode> 90AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("Code", InstanceMemberBindingFlags, null, typeof(global::NuGet.Common.NuGetLogCode), global::System.Array.Empty<global::System.Type>(), null), 93properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Common.NuGetLogCode>(options, info1);
JsonPackageSpecReader.Utf8JsonStreamReader.cs (13)
336ImmutableArray<NuGetLogCode> noWarn = []; 975var noWarn = new HashSet<NuGetLogCode>(); 976var warnAsError = new HashSet<NuGetLogCode>(); 977var warningsNotAsErrors = new HashSet<NuGetLogCode>(); 1136private static void ReadNuGetLogCodes(ref Utf8JsonStreamReader jsonReader, HashSet<NuGetLogCode> hashCodes) 1142if (jsonReader.TokenType == JsonTokenType.String && Enum.TryParse(jsonReader.GetString(), out NuGetLogCode code)) 1150private static ImmutableArray<NuGetLogCode> ReadNuGetLogCodesList(ref Utf8JsonStreamReader jsonReader) 1152NuGetLogCode[] items = null; 1159if (jsonReader.TokenType == JsonTokenType.String && Enum.TryParse(jsonReader.GetString(), out NuGetLogCode code)) 1163items = ArrayPool<NuGetLogCode>.Shared.Rent(16); 1169items = ArrayPool<NuGetLogCode>.Shared.Rent(items.Length * 2); 1172ArrayPool<NuGetLogCode>.Shared.Return(oldItems); 1186ArrayPool<NuGetLogCode>.Shared.Return(items);
LockFile\AssetsLogMessage.cs (5)
18[JsonConverter(typeof(JsonStringEnumConverter<NuGetLogCode>))] 19public NuGetLogCode Code { get; } 83NuGetLogCode code, 107public AssetsLogMessage(LogLevel logLevel, NuGetLogCode errorCode, 123public AssetsLogMessage(LogLevel logLevel, NuGetLogCode errorCode, string errorString)
LockFile\IAssetsLogMessage.cs (1)
21NuGetLogCode Code { get; }
LockFile\LockFileFormat.cs (1)
295writer.WriteValue(Enum.GetName(typeof(NuGetLogCode), logMessage.Code));
LockFile\Utf8JsonStreamIAssetsLogMessageConverter.cs (2)
20/// "code": "<see cref="NuGetLogCode"/>", 58NuGetLogCode code = default;
WarningProperties.cs (14)
20public ISet<NuGetLogCode> WarningsAsErrors { get; } 25public ISet<NuGetLogCode> NoWarn { get; } 35public ISet<NuGetLogCode> WarningsNotAsErrors { get; } 39WarningsAsErrors = new HashSet<NuGetLogCode>(); 40NoWarn = new HashSet<NuGetLogCode>(); 42WarningsNotAsErrors = new HashSet<NuGetLogCode>(); 45public WarningProperties(ISet<NuGetLogCode> warningsAsErrors, ISet<NuGetLogCode> noWarn, bool allWarningsAsErrors, ISet<NuGetLogCode> warningsNotAsErrors) 90return new WarningProperties(warningsAsErrors: new HashSet<NuGetLogCode>(WarningsAsErrors), noWarn: new HashSet<NuGetLogCode>(NoWarn), allWarningsAsErrors: AllWarningsAsErrors, warningsNotAsErrors: WarningsNotAsErrors); 104public static WarningProperties GetWarningProperties(string? treatWarningsAsErrors, ImmutableArray<NuGetLogCode> warningsAsErrors, ImmutableArray<NuGetLogCode> noWarn, ImmutableArray<NuGetLogCode> warningsNotAsErrors)
NuGet.Protocol (1)
Plugins\PluginPackageReader.cs (1)
1147throw new SignatureException(NuGetLogCode.NU3041, Strings.Plugin_DownloadNotSupportedSinceUnsignedNotAllowed);