diff --git a/src/Compiler/Service/service.fs b/src/Compiler/Service/service.fs index f4ecaad9355..615b7458691 100644 --- a/src/Compiler/Service/service.fs +++ b/src/Compiler/Service/service.fs @@ -1244,7 +1244,12 @@ type BackgroundCompiler lock gate (fun () -> options - |> Seq.iter (fun options -> incrementalBuildersCache.RemoveAnySimilar(AnyCallerThread, options))) + |> Seq.iter (fun options -> + incrementalBuildersCache.RemoveAnySimilar(AnyCallerThread, options) + + parseCacheLock.AcquireLock(fun ltok -> + for sourceFile in options.SourceFiles do + checkFileInProjectCache.RemoveAnySimilar(ltok, (sourceFile, 0L, options))))) member _.NotifyProjectCleaned(options: FSharpProjectOptions, userOpName) = use _ =