anchor.diff:  type TargetFramework =
       { Framework: string; Version: string }
       member this.Full = this.Framework + this.Version
  +
  +let private getTargetFramework (xmlDoc: XDocument option) (projFile: string) =
  +    let xmlDoc =
  +        match xmlDoc with
  +        | Some xmlDoc -> xmlDoc
  +        | None -> XDocument.Load(projFile)
  +    xmlDoc.Root.Elements()
  +    |> Seq.tryPick (fun el ->
  +        if el.Name.LocalName = "PropertyGroup" then
  +            el.Elements() |> Seq.tryPick (fun el ->
  +                if el.Name.LocalName = "TargetFramework"
  +                then Some el.Value
  +                else None)
  +        else None)
  +    |> function
  +        | Some framework ->
  +            let m = Regex.Match(framework, "(.*?)(\\d.*)")
  +            { Framework = m.Groups.[1].Value; Version = m.Groups.[2].Value }
  +        | None -> failwithf "Cannot find TargetFramework in %s" projFile
   
   // PAKET -----------------------------------------------------
   [<RequireQualifiedAccess>]
  
positive.code:             Directory.GetDirectories(IO.Path.Combine(pkgDir, "lib"))
              |> Seq.map Path.GetFileName
              |> Seq.sortDescending
              |> Seq.tryFind (fun framework ->
                  framework.StartsWith(targetFramework.Framework) && framework <= targetFramework.Full)
              |> function
                  | Some framework -> IO.Path.Combine(pkgDir, "lib", framework, refName + ".dll") |> PaketRef.Dll
                  | None -> failwithf "Cannot match target %s for library %s" targetFramework.Full refName)
  
  let private readPaketProjectRefLines projFile =
      let projDir = Path.GetDirectoryName(projFile)
      let projFileName = Path.GetFileName(projFile)
      let paketRefs = IO.Path.Combine(projDir, "obj", projFileName + ".references")
      if File.Exists(paketRefs)
      then File.ReadLines(paketRefs)
      else upcast [||] // TODO: Fail if .fsproj.references file not found?
  
  let getPaketRefs paketDir targetFramework projFile: PaketRef list =
      match paketDir with
      | None -> []
      | Some paketDir ->
          let paketRefs =
              readPaketProjectRefLines projFile
              |> Seq.choose (tryGetPaketRef paketDir targetFramework)
              |> Seq.toList
          // paketRefs
  
negative.code:         // |> Log.logVerbose
          paketRefs
  
  let private tryGetFableCorePkgDir paketDir targetFramework projFile =
      match paketDir with
      | Some paketDir ->
          readPaketProjectRefLines targetFramework projFile
          |> Seq.choose (tryGetPaketRefNameAndDir paketDir (fun l -> l.StartsWith("Fable.Core")))
          |> Seq.tryHead
          |> Option.map snd
  