From a68a058aa9c12e54ef1a84bab5f205ab48022074 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Fri, 25 Aug 2023 09:46:08 -0700 Subject: [PATCH 1/2] Fix diagnostic creation to ensure including the URI --- .../gen/DiagnosticDescriptors.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/DiagnosticDescriptors.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/DiagnosticDescriptors.cs index ec89ae4a42bc9a..409ab6de3f51c9 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/DiagnosticDescriptors.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/DiagnosticDescriptors.cs @@ -201,7 +201,7 @@ public static class DiagnosticDescriptors DiagnosticSeverity.Warning, isEnabledByDefault: true); - public static DiagnosticDescriptor LoggingUnsupportedLanguageVersion { get; } = new DiagnosticDescriptor( + public static DiagnosticDescriptor LoggingUnsupportedLanguageVersion { get; } = DiagnosticDescriptorHelper.Create( id: "SYSLIB1026", title: new LocalizableResourceString(nameof(SR.LoggingUnsupportedLanguageVersionTitle), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Logging.Generators.SR)), messageFormat: new LocalizableResourceString(nameof(SR.LoggingUnsupportedLanguageVersionMessageFormat), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Logging.Generators.SR)), From 3295fa3025551e055aa8f79f95360772290e31e0 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Fri, 25 Aug 2023 11:19:16 -0700 Subject: [PATCH 2/2] Fix the same issue with the Interop source gen --- .../gen/ComInterfaceGenerator/GeneratorDiagnostics.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs index f0b98c3c535ac3..b213e3a9704f29 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs @@ -477,7 +477,7 @@ public class Ids /// public static readonly DiagnosticDescriptor HResultTypeWillBeTreatedAsStruct = - new DiagnosticDescriptor( + DiagnosticDescriptorHelper.Create( Ids.NotRecommendedGeneratedComInterfaceUsage, GetResourceString(nameof(SR.HResultTypeWillBeTreatedAsStructTitle)), GetResourceString(nameof(SR.HResultTypeWillBeTreatedAsStructMessage)),