From 0dac9c082ccaf9cf7b4b746259f853daccdbbb85 Mon Sep 17 00:00:00 2001 From: Will Smith Date: Thu, 1 Oct 2020 18:42:58 -0700 Subject: [PATCH] Fixed find-all refs not looking at all files/projects. (#10207) --- .../src/FSharp.Editor/Navigation/FindUsagesService.fs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs b/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs index 9988f74d6c6..d0ce7ed88cf 100644 --- a/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs +++ b/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs @@ -103,7 +103,8 @@ type internal FSharpFindUsagesService |> Option.defaultValue externalDefinitionItem let referenceItem = FSharpSourceReferenceItem(definitionItem, FSharpDocumentSpan(doc, textSpan)) - do! context.OnReferenceFoundAsync(referenceItem) |> Async.AwaitTask } + // REVIEW: OnReferenceFoundAsync is throwing inside Roslyn, putting a try/with so find-all refs doesn't fail. + try do! context.OnReferenceFoundAsync(referenceItem) |> Async.AwaitTask with | _ -> () } match symbolUse.GetDeclarationLocation document with | Some SymbolDeclarationLocation.CurrentDocument ->