Skip to content

Commit 3e2505a

Browse files
committed
Tool version numbers have changed in mono 4.2
Ugly, but should hopefully be backwards compatible Related issue: fsprojects/FSharpLint#123 Also causes problems for fsharpautocomplete
1 parent 9bf7ae2 commit 3e2505a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/fsharp/vs/service.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2562,7 +2562,9 @@ type FSharpProjectFileInfo (fsprojFileName:string, ?properties, ?enableLogging)
25622562
let CrackProjectUsingOldBuildAPI(fsprojFile:string) =
25632563
let engine = new Microsoft.Build.BuildEngine.Engine()
25642564
#if FX_ATLEAST_45
2565-
engine.DefaultToolsVersion <- "12.0"
2565+
try
2566+
engine.DefaultToolsVersion <- "12.0"
2567+
with | _ -> engine.DefaultToolsVersion <- "4.0"
25662568
#else
25672569
engine.DefaultToolsVersion <- "4.0"
25682570
#endif

0 commit comments

Comments
 (0)