anchor.diff:  
           for fileItem in fileItems |> List.rev do
               let paketNode = this.createFileItemNode fileItem
  -            let xpath = sprintf "//ns:%s[starts-with(@Include, '%s')]" 
  -                                fileItem.BuildAction 
  -                                (Path.GetDirectoryName(fileItem.Include))
  -            let fileItemsInSameDir = this.Document.SelectNodes(xpath, this.Namespaces) |> Seq.cast<XmlNode>
  +
  +            let fileItemsInSameDir =
  +                this.Document 
  +                |> getDescendants fileItem.BuildAction
  +                |> List.filter (fun node -> 
  +                    match node |> getAttribute "Include" with
  +                    | Some path when path.StartsWith(Path.GetDirectoryName(fileItem.Include)) ->
  +                        true
  +                    | _ -> false)
  +
               if fileItemsInSameDir |> Seq.isEmpty 
               then 
                   newItemGroups.[fileItem.BuildAction].PrependChild(paketNode) |> ignore
  
positive.code:         |> 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) -> 
              { 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
  
      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)
          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))
  
  
      member this.OutputType =
          seq {for outputType in this.Document.SelectNodes("//ns:OutputType", this.Namespaces) ->
                  match outputType.InnerText with
                  | "Exe" -> ProjectOutputType.Exe
                  | _     -> ProjectOutputType.Library }
  
negative.code:                         (InstallModel.EmptyModel("",SemVer.Parse "0"))
  
          let chooseNode = this.GenerateXml(merged.FilterFallbacks())
  
          match this.ProjectNode |> getNodes "ItemGroup" |> Seq.firstOrDefault with
          | None -> this.ProjectNode.AppendChild(chooseNode) |> ignore
          | Some firstNode -> firstNode.ParentNode.InsertBefore(chooseNode,firstNode) |> ignore
                  
  