Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Commit 22b4ca8

Browse files
authored
don't update project info if the source file collection is empty (dotnet#3792)
1 parent b51e6b0 commit 22b4ca8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

LanguageService/LanguageService.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ type internal FSharpProjectOptionsManager
284284
| h when (h.IsCapabilityMatch("CPS")) ->
285285
let project = workspace.CurrentSolution.GetProject(projectId)
286286
let siteProvider = this.ProvideProjectSiteProvider(project)
287-
this.UpdateProjectInfo(tryGetOrCreateProjectId, projectId, siteProvider.GetProjectSite(), userOpName)
287+
let projectSite = siteProvider.GetProjectSite()
288+
if projectSite.CompilationSourceFiles.Length <> 0 then
289+
this.UpdateProjectInfo(tryGetOrCreateProjectId, projectId, projectSite, userOpName)
288290
| _ -> ()
289291

290292
member this.UpdateProjectInfoWithPath(path, userOpName) =

0 commit comments

Comments
 (0)