@@ -2816,16 +2816,22 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
28162816if runningOnMonothen
28172817[ let runtimeRoot = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
28182818let runtimeRootWithoutSlash = runtimeRoot.TrimEnd( '/' , '\\' )
2819- let api = runtimeRootWithoutSlash+ " -api"
2820- yield runtimeRoot// The default FSharp.Core is found in lib/mono/4.5
2821- if Directory.Exists( api) then
2822- yield api
2823- let facades = Path.Combine( api, " Facades" )
2824- if Directory.Exists( facades) then
2825- yield facades
2826- let facades = Path.Combine( runtimeRoot, " Facades" )
2827- if Directory.Exists( facades) then
2828- yield facades
2819+ match tcConfig.resolutionEnvironmentwith
2820+ #if ! FSI_ TODO_ NETCORE
2821+ | ReferenceResolver.RuntimeLike->
2822+ yield runtimeRoot
2823+ #endif
2824+ | _ ->
2825+ let api = runtimeRootWithoutSlash+ " -api"
2826+ yield runtimeRoot// The default FSharp.Core is found in lib/mono/4.5
2827+ if Directory.Exists( api) then
2828+ yield api
2829+ let facades = Path.Combine( api, " Facades" )
2830+ if Directory.Exists( facades) then
2831+ yield facades
2832+ let facades = Path.Combine( runtimeRoot, " Facades" )
2833+ if Directory.Exists( facades) then
2834+ yield facades
28292835]
28302836else
28312837#endif