Skip to content

Commit 5e66118

Browse files
committed
try using ToolHeper
1 parent 4369fa2 commit 5e66118

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/fsharp/ReferenceResolution.fs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ module internal MSBuildResolver =
139139
/// The list of supported .NET Framework version numbers, using the monikers of the Reference Assemblies folder.
140140
let SupportedNetFrameworkVersions = set [ Net20; Net30; Net35; Net40; Net45; Net451; (*SL only*) "v5.0" ]
141141

142-
#if CROSS_PLATFORM_COMPILER
142+
#if __IGNORE_CROSS_PLATFORM_COMPILER
143143
// Mono doesn't have GetPathToDotNetFramework. In this case we simply don't search this extra directory.
144144
// When the x-plat compiler is run on Mono this is ok since implementation assembly folder is the same as the target framework folder.
145145
// When the x-plat compiler is run on Windows/.NET this will curently cause slightly divergent behaviour.
@@ -148,7 +148,6 @@ module internal MSBuildResolver =
148148
/// Get the path to the .NET Framework implementation assemblies by using ToolLocationHelper.GetPathToDotNetFramework.
149149
/// This is only used to specify the "last resort" path for assembly resolution.
150150
let GetPathToDotNetFrameworkImlpementationAssemblies(v) =
151-
#if FX_ATLEAST_45
152151
let v =
153152
match v with
154153
| Net11 -> Some TargetDotNetFrameworkVersion.Version11
@@ -165,15 +164,10 @@ module internal MSBuildResolver =
165164
| null -> []
166165
| x -> [x]
167166
| _ -> []
168-
#else
169-
// FX_ATLEAST_45 is not defined for step when we build compiler with proto compiler.
170-
ignore v
171-
[]
172-
#endif
173167
#endif
174168

175169

176-
#if CROSS_PLATFORM_COMPILER
170+
#if __IGNORE_CROSS_PLATFORM_COMPILER
177171
// ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies is not available on Mono.
178172
// We currently use the old values that the F# 2.0 compiler assumed.
179173
// When the x-plat compiler is run on Mono this is ok since the asemblies are all in the framework folder
@@ -183,7 +177,7 @@ module internal MSBuildResolver =
183177
match version with
184178
| Net40 -> ReplaceVariablesForLegacyFxOnWindows([@"{ReferenceAssemblies}\v4.0"])
185179
| Net45 -> ReplaceVariablesForLegacyFxOnWindows([@"{ReferenceAssemblies}\v4.5"])
186-
| Net451 -> ReplaceVariablesForLegacyFxOnWindows([@"{ReferenceAssemblies}\v4.5"])
180+
| Net451 -> ReplaceVariablesForLegacyFxOnWindows([@"{ReferenceAssemblies}\v4.5.1"])
187181
| _ -> []
188182
#else
189183

tests/service/EditorTests.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ let ``Intro test`` () =
6969
let file = "/home/user/Test.fsx"
7070
let parseResult, typeCheckResults = parseAndCheckScript(file, input)
7171
let identToken = FSharpTokenTag.IDENT
72+
// let projectOptions = checker.GetProjectOptionsFromScript(file, input) |> Async.RunSynchronously
7273

7374
// We only expect one reported error. However,
7475
// on Unix, using filenames like /home/user/Test.fsx gives a second copy of all parse errors due to the

0 commit comments

Comments
 (0)