Skip to content

Commit 10a309d

Browse files
committed
Add Facades on Windows
1 parent 3438b3c commit 10a309d

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/fsharp/CompileOps.fs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2779,24 +2779,28 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
27792779
let facades = Path.Combine(api, "Facades")
27802780
if Directory.Exists(facades) then
27812781
yield facades
2782-
else
2783-
yield runtimeRoot
2784-
let facades = Path.Combine(runtimeRoot, "Facades")
2785-
if Directory.Exists(facades) then
2786-
yield facades
2782+
yield runtimeRoot // The defaut FSharp.Core is found in lib/mono/4.5
2783+
let facades = Path.Combine(runtimeRoot, "Facades")
2784+
if Directory.Exists(facades) then
2785+
yield facades
27872786
]
27882787
else
27892788
#endif
27902789
try
2790+
[
27912791
match tcConfig.resolutionEnvironment with
27922792
#if FX_MSBUILDRESOLVER_RUNTIMELIKE
27932793
| MSBuildResolver.RuntimeLike ->
2794-
[System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()]
2794+
yield System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
27952795
#endif
27962796
| _ ->
2797-
let frameworkRoot = MSBuildResolver.DotNetFrameworkReferenceAssembliesRootDirectoryOnWindows
2798-
let frameworkRootVersion = Path.Combine(frameworkRoot,tcConfig.targetFrameworkVersionMajorMinor)
2799-
[frameworkRootVersion]
2797+
let frameworkRoot = MSBuildResolver.DotNetFrameworkReferenceAssembliesRootDirectoryOnWindows
2798+
let frameworkRootVersion = Path.Combine(frameworkRoot,tcConfig.targetFrameworkVersionMajorMinor)
2799+
yield frameworkRootVersion
2800+
let facades = Path.Combine(frameworkRootVersion, "Facades")
2801+
if Directory.Exists(facades) then
2802+
yield facades
2803+
]
28002804
with e ->
28012805
errorRecovery e range0; []
28022806

0 commit comments

Comments
 (0)