@@ -21,6 +21,7 @@ open JetBrains.ReSharper.Plugins.FSharp.ProjectModel
2121open JetBrains.ReSharper .Plugins .FSharp .ProjectModel .Host .ProjectItems .ItemsContainer
2222open JetBrains.ReSharper .Plugins .FSharp .Shim .AssemblyReader
2323open JetBrains.ReSharper .Plugins .FSharp .Util
24+ open JetBrains.ReSharper .Psi
2425open JetBrains.ReSharper .Psi .Modules
2526open JetBrains.ReSharper .Resources .Shell
2627open JetBrains.Util
@@ -207,19 +208,15 @@ type FcsProjectBuilder(checkerService: FcsCheckerService, itemsContainer: IFShar
207208 && psiSourceFile.PrimaryPsiLanguage.Name = " F#"
208209 )
209210 |> Seq.map ( fun psiSourceFile ->
210- let name =
211- match psiSourceFile.Document with
212- | :? RiderDocument as rd -> rd.FullPath
213- | :? StandaloneDocument as sd -> sd.Moniker
214- | _ -> psiSourceFile.Name
215-
211+ let name = psiSourceFile.GetLocation() .FullPath
216212 let version = string psiSourceFile.Document.LastModificationStamp.Value
217213
218214 let getSource () =
219- use cookie = ReadLockCookie.Create()
220- psiSourceFile.Document.GetText()
221- |> FSharp.Compiler.Text.SourceTextNew.ofString
222- |> Task.FromResult
215+ task {
216+ use cookie = ReadLockCookie.Create()
217+ let text = psiSourceFile.Document.GetText()
218+ return FSharp.Compiler.Text.SourceTextNew.ofString text
219+ }
223220
224221 ProjectSnapshot.FSharpFileSnapshot.Create( name, version, getSource)
225222 )
0 commit comments