File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -64,18 +64,21 @@ module FsProjEdit =
6464
6565 let addProjectReferencePath path =
6666 promise {
67- let projects = Project.getAll () |> ResizeArray
67+ match path with
68+ | Some path ->
69+ let projects = Project.getAll () |> List.filter ( fun p -> p <> path) |> ResizeArray
6870
69- if projects.Count <> 0 then
70- let opts = createEmpty< QuickPickOptions>
71- opts.placeHolder <- Some " Reference"
71+ if projects.Count <> 0 then
72+ let opts = createEmpty< QuickPickOptions>
73+ opts.placeHolder <- Some " Reference"
7274
73- let! n = window.showQuickPick ( projects |> U2.Case1, opts)
75+ let! n = window.showQuickPick ( projects |> U2.Case1, opts)
7476
75- return !
76- match n, path with
77- | Some n, Some path -> LanguageService.dotnetAddProject path n
78- | _ -> Promise.empty
77+ return !
78+ match n with
79+ | Some n -> LanguageService.dotnetAddProject path n
80+ | _ -> Promise.empty
81+ | _ -> return ! Promise.empty
7982 }
8083
8184 let removeProjectReferencePath ref proj =
You can’t perform that action at this time.
0 commit comments