From f9623c2c27d3e517d2c79ee353e7040d6a6551e4 Mon Sep 17 00:00:00 2001 From: Kirill Osenkov Date: Wed, 14 Nov 2018 10:31:07 -0800 Subject: [PATCH] Hardcode two constants from Microsoft.VisualStudio.ImageCatalog.dll This removes the runtime reference to ImageCatalog which is not available on VS for Mac. --- .../RazorDirectiveCompletionSource.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.VisualStudio.Editor.Razor/RazorDirectiveCompletionSource.cs b/src/Microsoft.VisualStudio.Editor.Razor/RazorDirectiveCompletionSource.cs index 30b0163971..e4170e8acb 100644 --- a/src/Microsoft.VisualStudio.Editor.Razor/RazorDirectiveCompletionSource.cs +++ b/src/Microsoft.VisualStudio.Editor.Razor/RazorDirectiveCompletionSource.cs @@ -21,8 +21,11 @@ namespace Microsoft.VisualStudio.Editor.Razor { // Internal for testing internal static readonly object DescriptionKey = new object(); + // Hardcoding the Guid here to avoid a reference to Microsoft.VisualStudio.ImageCatalog.dll + // that is not present in Visual Studio for Mac + internal static readonly Guid ImageCatalogGuid = new Guid("{ae27a6b0-e345-4288-96df-5eaf394ee369}"); internal static readonly ImageElement DirectiveImageGlyph = new ImageElement( - new ImageId(KnownImageIds.ImageCatalogGuid, KnownImageIds.Type), + new ImageId(ImageCatalogGuid, 3233), // KnownImageIds.Type = 3233 "Razor Directive."); internal static readonly ImmutableArray DirectiveCompletionFilters = new[] { new CompletionFilter("Razor Directive", "r", DirectiveImageGlyph)