anchor.diff:          tracefn "References file saved to %s" this.FileName
   
       override this.ToString() =
  -        let printSourceFile (s:RemoteFileReference) = 
  -            "File:" + s.Name + 
  +        let printSourceFile (s:RemoteFileReference) =
  +            "File:" + s.Name +
                 (if s.Link <> ReferencesFile.DefaultLink then " " + s.Link else "") +
                 (match s.Settings.Link with | Some x -> " link: " + x.ToString().ToLower() | _ -> "")
   
  -        let printGroup g = 
  -            (g.NugetPackages |> List.collect (fun p -> 
  +        let printGroup g =
  +            (g.NugetPackages |> List.collect (fun p ->
                    let packageStr = String.Join(" ",[p.Name.ToString(); p.Settings.ToString()] |> List.filter (fun s -> s <> ""))
                    let excludes = (p.Settings.Excludes |> List.map (fun e -> sprintf "  exclude %s" e))
                    let aliases = (p.Settings.Aliases |> Seq.map (fun kv -> sprintf "  alias %s %s" kv.Key kv.Value)) |> Seq.toList
  
positive.code:       NugetPackages : PackageInstallSettings list
        RemoteFiles : RemoteFileReference list }
  
  type ReferencesFile = 
      { FileName: string
        Groups: Map<GroupName,InstallGroup> } 
      
      static member DefaultLink = Constants.PaketFilesFolderName
  
      static member New(fileName) = 
          let groups = [Constants.MainDependencyGroup, { Name = Constants.MainDependencyGroup; NugetPackages = []; RemoteFiles = [] }] |> Map.ofList
          { FileName = fileName
            Groups = groups }
  
      static member FromLines(lines : string[]) = 
          let groupedLines =
              lines
              |> Seq.map removeComment
              |> Seq.fold (fun state line -> 
                  match state with
                  | [] -> failwithf "error while parsing %A" lines
                  | ((name,lines) as currentGroup)::otherGroups ->
                      if line.StartsWith "group " then
                          let name = line.Replace("group","").Trim()
                          (GroupName name,[])::currentGroup::otherGroups
                      else 
                          (name,line::lines)::otherGroups) [Constants.MainDependencyGroup,[]]
              |> List.map (fun (name,lines) -> name,lines |> List.rev |> Array.ofList)
  
          let isSingleFile (line: string) = line.StartsWith "File:"
          let notEmpty (line: string) = not (String.IsNullOrWhiteSpace line)
          let parsePackageInstallSettings (line: string) : PackageInstallSettings = 
              let line = if line.StartsWith "nuget " then line.Substring(6) else line
                 
              let parts = line.Split(' ')
              { Name = PackageName parts.[0]
                Settings = InstallSettings.Parse(line.Replace(parts.[0],"")) } 
  
          let groups = 
              groupedLines 
              |> List.map (fun (groupName,lines) ->
                      let remoteLines,nugetLines =
                          lines 
                          |> Array.filter notEmpty 
                          |> Array.map (fun s -> s.Trim())
                          |> Array.toList
                          |> List.partition isSingleFile
          
                      let nugetPackages =
                          let packages = System.Collections.Generic.List<PackageInstallSettings>()
                          for line in nugetLines do
  
negative.code:                     Simplify = None } }
  
          match this.Groups |> Map.tryFind groupName with
          | None ->
                  tracefn "Adding package %O to %s into new group %O" packageName this.FileName groupName
  
                  let newGroup =
                      { Name = groupName
                        NugetPackages = [ package ]
                        RemoteFiles = [] }
  