Skip to content

Commit 0dac9c0

Browse files
authored
Fixed find-all refs not looking at all files/projects. (dotnet#10207)
1 parent 8b361cf commit 0dac9c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ type internal FSharpFindUsagesService
103103
|> Option.defaultValue externalDefinitionItem
104104

105105
let referenceItem = FSharpSourceReferenceItem(definitionItem, FSharpDocumentSpan(doc, textSpan))
106-
do! context.OnReferenceFoundAsync(referenceItem) |> Async.AwaitTask }
106+
// REVIEW: OnReferenceFoundAsync is throwing inside Roslyn, putting a try/with so find-all refs doesn't fail.
107+
try do! context.OnReferenceFoundAsync(referenceItem) |> Async.AwaitTask with | _ -> () }
107108

108109
match symbolUse.GetDeclarationLocation document with
109110
| Some SymbolDeclarationLocation.CurrentDocument ->

0 commit comments

Comments
 (0)