anchor.diff:  open Newtonsoft.Json
   open Ionic.Zip
   open System.Xml
  +open System.Collections.Generic
   
   let loadNuGetOData raw =
       let doc = XmlDocument()
  
positive.code:                }
      }
      
  /// Gets versions of the given package.
  let getAllVersions (nugetURL, package) = 
      // we cannot cache this
      async { 
          let! raw = sprintf "%s/package-versions/%s" nugetURL package |> safeGetFromUrl
          match raw with
          | None -> let! first = getAllVersionsFromNugetOData (nugetURL, package)
                    return first
          | Some data -> return JsonConvert.DeserializeObject<string []>(data) |> Array.toSeq
      }
  
  /// Parses NuGet version ranges.
  
negative.code: 
  
  /// Downloads the given package to the NuGet Cache folder
  let DownloadPackage(source, name, resolverStrategy, version, force) = 
      async { 
          let targetFileName = Path.Combine(CacheFolder, name + "." + version + ".nupkg")
          let targetFile = FileInfo targetFileName
          if not force && targetFile.Exists && targetFile.Length > 0L then 
              tracefn "%s %s already downloaded" name version
              return targetFileName
          else 
              // discover the link on the fly
              let! (link, _) = getDetailsFromNuget force source name resolverStrategy version
              use client = new WebClient()
              tracefn "Downloading %s %s to %s" name version targetFileName
              // TODO: Set credentials
              client.DownloadFileAsync(Uri link, targetFileName)
              let! _ = Async.AwaitEvent(client.DownloadFileCompleted)
              return targetFileName
      }
  
  