anchor.diff:                           })
   
   let UpdateReferenceToSpecificVersion projectName packageId (version : SemanticVersion) =
  -    let pm = GetManager projectName Remove
  +    let pm = GetManager projectName
       let existingPackage = pm.LocalRepository.FindPackage(packageId)
       pm.UninstallPackage(existingPackage, true, true)
       pm.InstallPackage(packageId, version, false, true)
   
   let UpdateReference projectName (packageId : string) =
  -    let pm = GetManager projectName Remove
  +    let pm = GetManager projectName
       let existingPackage = pm.LocalRepository.FindPackage(packageId)
       pm.UninstallPackage(existingPackage, true, true)
       pm.InstallPackage packageId
   
   let InstallReferenceOfSpecificVersion projectName packageId (version : SemanticVersion) =
  -    let manager = GetManager projectName Install
  +    let manager = GetManager projectName
       manager.InstallPackage(packageId, version, false, true)
   
   let InstallReference projectName packageId =
  -    let manager = GetManager projectName Install
  +    let manager = GetManager projectName
       manager.InstallPackage packageId
   
   let RestoreReferences projectName =
  -    let manager = GetRawManager projectName Remove
  +    let manager = GetRawManager projectName
       let packages = getRestorePackages projectName
       packages
       |> Seq.iter (fun p -> manager.InstallPackage(p.Id, p.Version, false, true))
   
   let RemoveReference projectName (packageId : string) =
  -    let manager = GetManager projectName Remove
  +    let manager = GetManager projectName
       let restorePackages = getRestorePackages projectName
       let version = (Seq.find (fun p -> p.Id = packageId) restorePackages).Version
       let package = manager.LocalRepository.FindPackage(packageId, version)
  
positive.code:         Path.Combine(dir.FullName, "packages")
      | None -> Path.Combine(projectDir, "packages")
  
  type ActionType =
      | Install
      | Remove
  
  type InstallSharedPackageRepository (repositoryPath : string, projectName : string) =
      inherit SharedPackageRepository(repositoryPath)
      override this.Exists(packageId : string, version : SemanticVersion) =
          let packagesConfig = FileInfo(Path.Combine(Path.GetDirectoryName projectName, "packages.config"))
          if packagesConfig.Exists then
              using
                  (packagesConfig.OpenRead())
                  (fun file ->
                      let packagesXml = XDocument.Load(file)
                      packagesXml.Descendants(XName.Get "package")
                      |> Seq.exists(fun x -> x.Attribute(XName.Get "id").Value = packageId))
          else
              false
  
  let private GetRawManager (projectName : string) actionType =
      if String.IsNullOrWhiteSpace projectName then raise <| ArgumentException("projectName cannot be empty")
      let projectDir = Path.GetFullPath <| Path.GetDirectoryName projectName
      let settings = Settings.LoadDefaultSettings(PhysicalFileSystem projectDir)
      let repositoryPath = 
          match settings.GetRepositoryPath() with
  
negative.code:     packageManager.Logger <- logger
      packageManager
  
  let private GetManager projectName =
      let packageManager = GetRawManager projectName
      let project = ProjectSystem(projectName) :> IProjectSystem
      packageManager.PackageInstalling.Add(fun ev -> InstallToPackagesConfigFile ev.Package project)
      packageManager.PackageInstalling.Add(fun ev -> AddFilesToProj ev.InstallPath ev.Package project)
  