anchor.diff:                                                  | OverrideAll v -> 
                                                       if v <> resolvedPackage.Version then
                                                           failwithf "Versions in %s and %s are not identical for package %O." lockFile.FileName dependenciesFile.FileName np.Name
  -                                                    Some(VersionRequirement(Specific resolvedPackage.Version,pre))
  +                                                    Some(VersionRequirement(Specific resolvedPackage.Version,pre), resolvedPackage.Settings.FrameworkRestrictions)
                                                   | Specific v -> 
                                                       if v <> resolvedPackage.Version then
                                                           failwithf "Versions in %s and %s are not identical for package %O." lockFile.FileName dependenciesFile.FileName np.Name
  -                                                    Some(VersionRequirement(Specific resolvedPackage.Version,pre))
  +                                                    Some(VersionRequirement(Specific resolvedPackage.Version,pre), resolvedPackage.Settings.FrameworkRestrictions)
                                                   | Maximum v ->
                                                       if v = resolvedPackage.Version then
  -                                                        Some(VersionRequirement(Specific resolvedPackage.Version,pre))
  +                                                        Some(VersionRequirement(Specific resolvedPackage.Version,pre), resolvedPackage.Settings.FrameworkRestrictions)
                                                       else
  -                                                        Some(VersionRequirement(VersionRange.Range(VersionRangeBound.Including,resolvedPackage.Version,v,VersionRangeBound.Including),pre))
  +                                                        Some(VersionRequirement(VersionRange.Range(VersionRangeBound.Including,resolvedPackage.Version,v,VersionRangeBound.Including),pre), resolvedPackage.Settings.FrameworkRestrictions)
                                                   | Range(_,_,v2,ub) ->
  -                                                    Some(VersionRequirement(VersionRange.Range(VersionRangeBound.Including,resolvedPackage.Version,v2,ub),pre))
  -                                                | _ -> Some(VersionRequirement(Minimum resolvedPackage.Version,pre))
  -                                            | None -> Some requirement.VersionRequirement
  +                                                    Some(VersionRequirement(VersionRange.Range(VersionRangeBound.Including,resolvedPackage.Version,v2,ub),pre), resolvedPackage.Settings.FrameworkRestrictions)
  +                                                | _ -> Some(VersionRequirement(Minimum resolvedPackage.Version,pre), resolvedPackage.Settings.FrameworkRestrictions)
  +                                            | None -> Some (requirement.VersionRequirement, requirement.Settings.FrameworkRestrictions)
                                       else
  -                                        Some requirement.VersionRequirement
  +                                        Some (requirement.VersionRequirement, requirement.Settings.FrameworkRestrictions)
                                   | None ->
                                       match lockFile.Groups |> Map.tryFind groupName with
                                       | None -> None
  
positive.code:                                     
                                      if minimumFromLockFile || requirement.VersionRequirement = VersionRequirement.NoRestriction then
                                          match lockFile.Groups |> Map.tryFind groupName with
                                          | None -> Some requirement.VersionRequirement
                                          | Some group ->
                                              match Map.tryFind np.Name group.Resolution with
                                              | Some resolvedPackage -> 
  
negative.code:                 Symbols = s }
      | _ -> Invalid
  
  let addDependencyToFrameworkGroup framework dependencyGroups dependencyWithFwRestriction =
      let dependency, (fwRestriction: FrameworkRestrictions) =
          let pkgName, version, fwRestriction = dependencyWithFwRestriction
          (pkgName, version), fwRestriction
  
      let isCompatibleWith (fwOption: FrameworkIdentifier option) =
          match fwOption with
          | None -> true
          | Some fw ->
              if fwRestriction.IsSupersetOf (FrameworkRestriction.Exactly fw) then
                  true
              else
                  false
  
      dependencyGroups
      |> List.tryFind (fun g -> g.Framework = framework)
      |> function
      | None ->
          if isCompatibleWith framework then
              let newGroup = OptionalDependencyGroup.For framework [dependency]
              newGroup :: dependencyGroups
          else
              dependencyGroups
      | _ ->
          dependencyGroups
          |> List.map (fun g ->
              if g.Framework <> framework then g
              else
                  if isCompatibleWith g.Framework then
                      { g with Dependencies = dependency :: g.Dependencies }
                  else
                      g)
  
  let addDependency (templateFile : TemplateFile) (dependency : PackageName * VersionRequirement * FrameworkRestrictions) =
      match templateFile with
      | CompleteTemplate(core, opt) -> 
          let packageName = dependency |> (fun (n,_,_) -> n)
          let newDeps =
              opt.DependencyGroups
              |> List.tryFind (fun g ->
  