From 45445c2c160888a44cd996378ecfb7834f6f10c1 Mon Sep 17 00:00:00 2001 From: "calvin@codingwithcalvin.net" Date: Tue, 30 Dec 2025 17:55:25 -0500 Subject: [PATCH] feat(generators): add string constant for top-level VSCT GUIDs Top-level GUIDs (those without IDSymbols) now generate both a string constant and a Guid field, consistent with command set GUIDs. --- .../VsctGuidsGenerator.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CodingWithCalvin.VsixSdk.Generators/VsctGuidsGenerator.cs b/src/CodingWithCalvin.VsixSdk.Generators/VsctGuidsGenerator.cs index 5f731a1..61fa7dd 100644 --- a/src/CodingWithCalvin.VsixSdk.Generators/VsctGuidsGenerator.cs +++ b/src/CodingWithCalvin.VsixSdk.Generators/VsctGuidsGenerator.cs @@ -160,9 +160,10 @@ private static string GenerateSource(string rootNamespace, string className, str { if (guidSymbol.IdSymbols.Count == 0) { - // Simple GUID constant + // Simple GUID constant with both string and Guid versions sb.AppendLine($" /// GUID: {{{guidSymbol.Value}}}"); - sb.AppendLine($" public static readonly Guid {guidSymbol.Name} = new Guid(\"{guidSymbol.Value}\");"); + sb.AppendLine($" public const string {guidSymbol.Name}String = \"{guidSymbol.Value}\";"); + sb.AppendLine($" public static readonly Guid {guidSymbol.Name} = new Guid({guidSymbol.Name}String);"); sb.AppendLine(); } else