File tree Expand file tree Collapse file tree
src/FSharp.Formatting.Common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -282,14 +282,18 @@ module internal CompilerServiceExtensions =
282282 |> Seq.filter ( fun file ->
283283 let fileName = Path.GetFullPath file |> Path.GetFileName
284284
285- dllFiles
286- |> List.exists ( fun ( dllFile : string ) -> Path.GetFileName dllFile =? fileName)
287- |> not )
288- |> Seq.filter ( fun file ->
289- if Path.GetFileName file =? " FSharp.Core.dll" then
290- FSharpAssemblyHelper.tryCheckFsCore file |> Option.isSome
291- else
292- true )
285+ let dllNotAlreadyReferenced =
286+ dllFiles
287+ |> List.exists ( fun ( dllFile : string ) -> Path.GetFileName dllFile =? fileName)
288+ |> not
289+
290+ let checkFSharpCore =
291+ if Path.GetFileName file =? " FSharp.Core.dll" then
292+ FSharpAssemblyHelper.tryCheckFsCore file |> Option.isSome
293+ else
294+ true
295+
296+ dllNotAlreadyReferenced && checkFSharpCore)
293297 |> Seq.toList
294298
295299 // See https://github.com/tpetricek/FSharp.Formatting/commit/5d14f45cd7e70c2164a7448ea50a6b9995166489
@@ -350,7 +354,6 @@ type internal FsiEvaluationException
350354 ( Log.formatArgs args)
351355 ( base .ToString())
352356
353-
354357/// Exception for invalid expression types
355358type internal FsiExpressionTypeException =
356359 val private value : obj option
You can’t perform that action at this time.
0 commit comments