diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index e4ca0eff0e..f4bf8e218e 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 0.10.0-alpha003 - 24.10.2014 +* Fix timing issue with paket install --hard - https://github.com/fsprojects/Paket/issues/293 + #### 0.10.0-alpha002 - 24.10.2014 * Paket add doesn't fail on second attempt - https://github.com/fsprojects/Paket/issues/295 diff --git a/src/Paket.Core/ProjectFile.fs b/src/Paket.Core/ProjectFile.fs index 27d383482c..87dd57ce60 100644 --- a/src/Paket.Core/ProjectFile.fs +++ b/src/Paket.Core/ProjectFile.fs @@ -229,16 +229,21 @@ type ProjectFile = member this.UpdateReferences(completeModel: Map, usedPackages : Dictionary, hard) = this.DeletePaketNodes("Reference") this.DeleteEmptyReferences() - for kv in usedPackages do - let packageName = kv.Key - let installModel = completeModel.[packageName.ToLower()] - if hard then + if hard then + for kv in usedPackages do + let installModel = completeModel.[kv.Key.ToLower()] this.DeleteCustomNodes(installModel) - if this.HasCustomNodes(installModel) then verbosefn " - custom nodes for %s ==> skipping" packageName else - let chooseNode = this.GenerateXml(installModel) - this.ProjectNode.AppendChild(chooseNode) |> ignore + for kv in usedPackages do + let packageName = kv.Key + let installModel = completeModel.[packageName.ToLower()] + + if this.HasCustomNodes(installModel) then + verbosefn " - custom nodes for %s ==> skipping" packageName + else + let chooseNode = this.GenerateXml(installModel) + this.ProjectNode.AppendChild(chooseNode) |> ignore member this.Save() = if Utils.normalizeXml this.Document <> this.OriginalText then