diff --git a/src/EditorFeatures/Next/Options/EditorConfigDocumentOptionsProvider.cs b/src/EditorFeatures/Next/Options/EditorConfigDocumentOptionsProvider.cs index 11ddd3197cf374255f0930f0655df38b532f6a6b..cd60a98b2e033464c1d03f5973132232b7679401 100644 --- a/src/EditorFeatures/Next/Options/EditorConfigDocumentOptionsProvider.cs +++ b/src/EditorFeatures/Next/Options/EditorConfigDocumentOptionsProvider.cs @@ -102,8 +102,11 @@ public async Task GetOptionsForDocumentAsync(Document document } // We don't have anything cached, so we'll just get it now lazily and not hold onto it. The workspace layer will ensure - // that we maintain snapshot rules for the document options. - using (var context = await _codingConventionsManager.GetConventionContextAsync(path, cancellationToken).ConfigureAwait(false)) + // that we maintain snapshot rules for the document options. We'll also run it on the thread pool + // as in some builds the ICodingConventionsManager captures the thread pool. + var conventionsAsync = Task.Run(() => _codingConventionsManager.GetConventionContextAsync(path, cancellationToken)); + + using (var context = await conventionsAsync.ConfigureAwait(false)) { return new DocumentOptions(context.CurrentConventions); }