anchor.diff:          |> List.map (fun n ->  FileInfo(Path.Combine(Path.GetDirectoryName(this.FileName), n.Attributes.["Include"].Value)))
   
       member this.GetInterProjectDependencies() =  
  -        [for n in this.Document.SelectNodes("//ns:ProjectReference", this.Namespaces) -> 
  +        [for n in this.Document |> getDescendants "ProjectReference" -> 
               { Path = n.Attributes.["Include"].Value
                 Name = n.SelectSingleNode("ns:Name", this.Namespaces).InnerText
                 GUID = n.SelectSingleNode("ns:Project", this.Namespaces).InnerText |> Guid.Parse
                 Private = n.SelectSingleNode("ns:Private", this.Namespaces).InnerText |> bool.Parse }]
   
       member this.ReplaceNugetPackagesFile() =
  -        let nugetNode = this.Document.SelectSingleNode("//ns:*[@Include='packages.config']", this.Namespaces)
  -        if nugetNode = null then () else
  -        match [for node in this.Document.SelectNodes("//ns:*[@Include='" + Constants.ReferencesFile + "']", this.Namespaces) -> node] with 
  -        | [_] -> nugetNode.ParentNode.RemoveChild(nugetNode) |> ignore
  -        | [] -> nugetNode.Attributes.["Include"].Value <- Constants.ReferencesFile
  -        | _::_ -> failwithf "multiple %s nodes in project file %s" Constants.ReferencesFile this.FileName
  +        let noneNodes = this.Document |> getDescendants "None"
  +        match noneNodes |> List.tryFind (fun n -> n |> getAttribute "Include" = Some "packages.config") with
  +        | None -> ()
  +        | Some nugetNode ->
  +            match noneNodes |> List.filter (fun n -> n |> getAttribute "Include" = Some Constants.ReferencesFile) with 
  +            | [_] -> nugetNode.ParentNode.RemoveChild(nugetNode) |> ignore
  +            | [] -> nugetNode.Attributes.["Include"].Value <- Constants.ReferencesFile
  +            | _::_ -> failwithf "multiple %s nodes in project file %s" Constants.ReferencesFile this.FileName
   
       member this.RemoveNugetTargetsEntries() =
           let toDelete = 
  -            [ this.Document.SelectNodes("//ns:RestorePackages", this.Namespaces)
  -              this.Document.SelectNodes("//ns:Import[@Project='$(SolutionDir)\\.nuget\\nuget.targets']", this.Namespaces) 
  -              this.Document.SelectNodes("//ns:Target[@Name='EnsureNuGetPackageBuildImports']", this.Namespaces)]
  -            |> List.map (Seq.cast<XmlNode> >> Seq.firstOrDefault)
  +            [ this.Document |> getDescendants "RestorePackages" |> Seq.firstOrDefault
  +              this.Document 
  +              |> getDescendants "Import" 
  +              |> List.tryFind (fun n -> n |> getAttribute "Project" = Some "$(SolutionDir)\\.nuget\\nuget.targets")
  +              this.Document
  +              |> getDescendants "Target"
  +              |> List.tryFind (fun n -> n |> getAttribute "Name" = Some "EnsureNuGetPackageBuildImports") ]
  +            |> List.choose id
  +        
           toDelete
           |> List.iter 
  -            (Option.iter 
  -                (fun node -> 
  -                     let parent = node.ParentNode
  -                     node.ParentNode.RemoveChild(node) |> ignore
  -                     if not parent.HasChildNodes then parent.ParentNode.RemoveChild(parent) |> ignore))
  -
  +            (fun node -> 
  +                let parent = node.ParentNode
  +                node.ParentNode.RemoveChild(node) |> ignore
  +                if not parent.HasChildNodes then parent.ParentNode.RemoveChild(parent) |> ignore)
   
       member this.OutputType =
  -        seq {for outputType in this.Document.SelectNodes("//ns:OutputType", this.Namespaces) ->
  +        seq {for outputType in this.Document |> getDescendants "OutputType" ->
                   match outputType.InnerText with
                   | "Exe" -> ProjectOutputType.Exe
                   | _     -> ProjectOutputType.Library }
  
positive.code:         let nodesToDelete = List<_>()
          
          let libs = model.GetReferenceNames.Force()
          for node in this.Document.SelectNodes("//ns:Reference", this.Namespaces) do
              if Set.contains (node.Attributes.["Include"].InnerText.Split(',').[0]) libs then          
                  nodesToDelete.Add node
  
  
negative.code:         let libs = model.GetReferenceNames.Force()
          
          let hasCustom = ref false
          for node in this.Document |> getDescendants "Reference" do
              if Set.contains (node.Attributes.["Include"].InnerText.Split(',').[0]) libs then
                  let isPaket = ref false
                  for child in node.ChildNodes do
  