anchor.diff:              | NuspecReferences.All -> true
               | NuspecReferences.Explicit list -> List.exists lib.EndsWith list
   
  -        if not install then this else 
  +        if not install then this else
  +
           this.AddOrReplaceGroup(
               framework.Group,
  -            (fun group ->
  -                { group with Frameworks = 
  -                                match Map.tryFind framework group.Frameworks with
  -                                | Some files -> 
  -                                    Map.add framework (files.AddReference lib) group.Frameworks
  -                                | None -> 
  -                                    Map.add framework (InstallFiles.singleton lib) 
  -                                        group.Frameworks }),
  -            (fun _ -> Some { Frameworks = Map.add framework (InstallFiles.singleton lib) Map.empty; Fallbacks = InstallFiles.empty }))
  +            (fun group -> 
  +                group.ReplaceFramework(
  +                    framework,
  +                    (fun files -> files.AddReference lib),
  +                    (fun _ -> Some (InstallFiles.singleton lib)))),
  +            (fun _ -> Some(FrameworkGroup.singleton(framework,InstallFiles.singleton lib))))
   
       member this.AddReferences(libs, references) : InstallModel = 
           Seq.fold (fun model lib -> 
  
positive.code:                 match reference with
                  | Reference.Library lib -> not (lib.EndsWith ".dll" || lib.EndsWith ".exe")
                  | _ -> false ]
          { this with Groups = 
                          this.Groups 
                          |> Map.map 
  
negative.code:         else 
              FrameworkIdentifier.KnownSpecialTargets 
              |> List.fold (fun (model : InstallModel) framework -> 
                      model.AddOrReplaceGroup(
                          framework.Group,
                          (fun group ->
                              match Map.tryFind framework group.Frameworks with
                              | Some files when Set.isEmpty files.References -> 
                                  { group with Frameworks = 
                                                  Map.add framework { References = newFiles
                                                                      ContentFiles = Set.empty } 
                                                      group.Frameworks }
                              | None -> 
                                  { group with Frameworks = 
                                                  Map.add framework { References = newFiles
                                                                      ContentFiles = Set.empty } 
                                                      group.Frameworks }
                              | _ -> group),
                          (fun _ -> Some ({ Frameworks = Map.add framework { References = newFiles; ContentFiles = Set.empty } Map.empty
                                            Fallbacks = InstallFiles.empty })))) this
      
      member this.UseLastInGroupAsFallback() = 
          let groups = 
  