From 1743beffdee2e126d91f4eb7a21151675fb0406b 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 ec89ae4a42bc9..409ab6de3f51c 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 68b3f6805f87d0fe1a2880b47cddae311d9b0a9c 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 f0b98c3c535ac..b213e3a9704f2 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)),