@@ -182,10 +182,6 @@ module internal FSharpEnvironment =
182182 // - default location of fsi.exe in FSharp.VS.FSI.dll (REVIEW: check this)
183183 // - default F# binaries directory in (project system) Project.fs
184184 let BinFolderOfDefaultFSharpCompiler ( probePoint : string option ) =
185- #if FX_ NO_ WIN_ REGISTRY
186- ignore probePoint
187- Some AppDomain.CurrentDomain.BaseDirectory
188- #else
189185 // Check for an app.config setting to redirect the default compiler location
190186 // Like fsharp-compiler-location
191187 try
@@ -200,18 +196,17 @@ module internal FSharpEnvironment =
200196 // Look in the probePoint if given, e.g. look for a compiler alongside of FSharp.Build.dll
201197 match probePoint with
202198 | Some p when safeExists ( Path.Combine( p, " FSharp.Core.dll" )) -> Some p
203- | _ ->
204-
205- // We let you set FSHARP_COMPILER_BIN. I've rarely seen this used and its not documented in the install instructions.
206- let result = Environment.GetEnvironmentVariable( " FSHARP_COMPILER_BIN" )
207- if not ( String.IsNullOrEmpty( result)) then
208- Some result
209- else
210- // For the prototype compiler, we can just use the current domain
211- tryCurrentDomain()
199+ | _ ->
200+ // We let you set FSHARP_COMPILER_BIN. I've rarely seen this used and its not documented in the install instructions.
201+ let result = Environment.GetEnvironmentVariable( " FSHARP_COMPILER_BIN" )
202+ if not ( String.IsNullOrEmpty( result)) then
203+ Some result
204+ else
205+ // For the prototype compiler, we can just use the current domain
206+ tryCurrentDomain()
212207 with e -> None
213208
214-
209+ #if ! FX _ NO _ WIN _ REGISTRY
215210 // Apply the given function to the registry entry corresponding to the subKey.
216211 // The reg key is disposed at the end of the scope.
217212 let useKey subKey f =
@@ -236,7 +231,7 @@ module internal FSharpEnvironment =
236231 IsNetFx45OrAboveInstalledAt @" SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client" ||
237232 IsNetFx45OrAboveInstalledAt @" SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" ||
238233 runningOnMono
239-
234+
240235 // Check if the running framework version is 4.5 or above.
241236 // Use the presence of v4.5.x in the registry to distinguish between 4.0 and 4.5
242237 let IsRunningOnNetFx45OrAbove =
0 commit comments