diff --git a/src/Paket.Core/UpdateProcess.fs b/src/Paket.Core/UpdateProcess.fs index de4ae7ccaa..2ca38c87e9 100644 --- a/src/Paket.Core/UpdateProcess.fs +++ b/src/Paket.Core/UpdateProcess.fs @@ -104,15 +104,13 @@ let SelectiveUpdate(dependenciesFile : DependenciesFile, updateAll, exclude, for else LockFile.LoadFrom lockFileName.FullName - let excludePackages = + let requirements = match exclude with - | Some e -> [e] + | Some e -> + oldLockFile.ResolvedPackages + |> createPackageRequirements [e] | None -> [] - let requirements = - oldLockFile.ResolvedPackages - |> createPackageRequirements excludePackages - let lockFile = selectiveUpdate (fun d p -> d.Resolve(force, p, requirements)) oldLockFile dependenciesFile updateAll exclude lockFile.Save() lockFile