Skip to content

Commit 917eb4f

Browse files
KevinRansombaronfel
authored andcommitted
Pick correct dependencies when scripting on coreclr (#7889)
* Pick correct dependencies when scripting on coreclr * Look in pack directory for references
1 parent 521a591 commit 917eb4f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/fsharp/CompileOps.fs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2816,7 +2816,11 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
28162816
let facades = Path.Combine(frameworkRootVersion, "Facades")
28172817
if Directory.Exists facades then
28182818
yield facades
2819-
]
2819+
match frameworkRefsPackDirectory with
2820+
| Some path when Directory.Exists(path) ->
2821+
yield path
2822+
| _ -> ()
2823+
]
28202824
with e ->
28212825
errorRecovery e range0; []
28222826

src/fsharp/service/FSharpCheckerResults.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2209,7 +2209,7 @@ type FsiInteractiveChecker(legacyReferenceResolver,
22092209

22102210
let backgroundDiagnostics = [| |]
22112211
let reduceMemoryUsage = ReduceMemoryFlag.Yes
2212-
let assumeDotNetFramework = true
2212+
let assumeDotNetFramework = tcConfig.primaryAssembly = PrimaryAssembly.Mscorlib
22132213

22142214
let applyCompilerOptions tcConfigB =
22152215
let fsiCompilerOptions = CompileOptions.GetCoreFsiCompilerOptions tcConfigB

0 commit comments

Comments
 (0)