Skip to content

Commit 0862f70

Browse files
authored
Merge pull request #151 from juergenhoetzel/vs2017-msbuild-fix
Search msbuild.exe in Visual Studio 2017 directories
2 parents 5662476 + 86b57a2 commit 0862f70

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

fsharp-mode-util.el

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,24 @@ for all *nix.")
4141
(getenv "ProgramFiles")
4242
"C:\\Program Files (x86)")))))
4343

44+
(defun fsharp-mode--vs2017-msbuild-find (exe)
45+
"Return EXE absolute path for Visual Studio 2017, if existent, else nil."
46+
(->> (--map (concat (fsharp-mode--program-files-x86)
47+
"Microsoft Visual Studio/2017/"
48+
it
49+
"msbuild/15.0/bin/"
50+
exe)
51+
'("Enterprise/" "Professional/" "Community/" "BuildTools/"))
52+
(--first (file-executable-p it))))
53+
4454
(defun fsharp-mode--msbuild-find (exe)
4555
(if fsharp-ac-using-mono
4656
(executable-find exe)
4757
(let* ((searchdirs (--map (concat (fsharp-mode--program-files-x86)
4858
"MSBuild/" it "/Bin")
4959
'("14.0" "13.0" "12.0")))
5060
(exec-path (append searchdirs exec-path)))
51-
(executable-find exe))))
61+
(or (fsharp-mode--vs2017-msbuild-find exe) (executable-find exe)))))
5262

5363
(defun fsharp-mode--executable-find (exe)
5464
(if fsharp-ac-using-mono

0 commit comments

Comments
 (0)