anchor.diff:                                          // to current locked version
                                           group.Resolution
                                           |> Map.tryFind np.Name
  -                                        |> Option.map (fun transitive -> VersionRequirement(Minimum transitive.Version, getPreReleaseStatus transitive.Version))
  +                                        |> Option.map (fun transitive -> VersionRequirement(Minimum transitive.Version, getPreReleaseStatus transitive.Version), transitive.Settings.FrameworkRestrictions)
                               else
                                   match lockFile.Groups |> Map.tryFind groupName with
                                   | None -> None
                                   | Some group ->
                                       Map.tryFind np.Name group.Resolution
  -                                    |> Option.map (fun resolvedPackage -> resolvedPackage.Version)
  -                                    |> Option.map (fun version -> VersionRequirement(Specific version, getPreReleaseStatus version))
  -                    let dep =
  +                                    |> Option.map (fun resolvedPackage ->
  +                                        let version = resolvedPackage.Version
  +                                        VersionRequirement(Specific version, getPreReleaseStatus version), resolvedPackage.Settings.FrameworkRestrictions)
  +                    let dep, depFwRestriction =
                           match dependencyVersionRequirement with
                           | Some installed -> installed
                           | None -> failwithf "No package with id '%O' installed in group %O." np.Name groupName
  -                     
  -                    np.Name, dep)
  -
  +             
  +                    np, dep, depFwRestriction)
  +            |> List.map (fun (np, dep, depFwRestriction) -> 
  +                let fwRestriction =
  +                    match depFwRestriction, np.Settings.FrameworkRestrictions with
  +                    | AutoDetectFramework, AutoDetectFramework -> ExplicitRestriction(FrameworkRestriction.NoRestriction)
  +                    | AutoDetectFramework, ExplicitRestriction fr -> ExplicitRestriction fr
  +                    | ExplicitRestriction fr, AutoDetectFramework -> ExplicitRestriction fr
  +                    | ExplicitRestriction fr1, ExplicitRestriction fr2 -> ExplicitRestriction (FrameworkRestriction.combineRestrictionsWithAnd fr1 fr2)
  +                np.Name, dep, fwRestriction)
           deps
           |> List.fold addDependency withDepsAndIncluded
  
positive.code:                                                 | 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))
                                                  | 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))
                                                  | Maximum v ->
                                                      if v = resolvedPackage.Version then
                                                          Some(VersionRequirement(Specific resolvedPackage.Version,pre))
                                                      else
                                                          Some(VersionRequirement(VersionRange.Range(VersionRangeBound.Including,resolvedPackage.Version,v,VersionRangeBound.Including),pre))
                                                  | Range(_,_,v2,ub) ->
                                                      Some(VersionRequirement(VersionRange.Range(VersionRangeBound.Including,resolvedPackage.Version,v2,ub),pre))
                                                  | _ -> Some(VersionRequirement(Minimum resolvedPackage.Version,pre))
                                              | None -> Some requirement.VersionRequirement
                                      else
                                          Some requirement.VersionRequirement
                                  | None ->
                                      match lockFile.Groups |> Map.tryFind groupName with
                                      | None -> None
  
negative.code:                     | _ -> true)
              |> List.map (fun (group, np, specificVersionRequirement) ->
                  let specificVersionRequirement = defaultArg specificVersionRequirement VersionRequirement.AllReleases
                  let noFrameworkRestriction = FrameworkRestrictions.ExplicitRestriction (FrameworkRestriction.NoRestriction)
                  match group with
                  | None ->
                      match version with
                      | Some v -> 
                          let vr = interprojectReferencesConstraint.CreateVersionRequirements v
                          np,VersionRequirement(vr, getPreReleaseStatus v),noFrameworkRestriction
                      | None -> 
                          if minimumFromLockFile then
                              let groupName =
  