diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 16e63f86a0..da92c622c8 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 2.3.1 - 21.09.2015 +* BUGFIX: NullReferenceException in applyBindingRedirects during "update nuget package" - https://github.com/fsprojects/Paket/issues/1074 + #### 2.3.0 - 21.09.2015 * Binding redirects from target platform only - https://github.com/fsprojects/Paket/pull/1070 * Allow to enable redirects per package - http://fsprojects.github.io/Paket/nuget-dependencies.html#redirects-settings diff --git a/src/Paket.Core/ProjectFile.fs b/src/Paket.Core/ProjectFile.fs index eb529890fe..daf203ec0e 100644 --- a/src/Paket.Core/ProjectFile.fs +++ b/src/Paket.Core/ProjectFile.fs @@ -671,18 +671,21 @@ type ProjectFile = KnownTargetProfiles.FindPortableProfile profile | _ -> let framework = - seq {for outputType in this.Document |> getDescendants "TargetFrameworkVersion" -> - outputType.InnerText } - |> Seq.map (fun s -> - let prefix = - match this.GetTargetFrameworkIdentifier() with - | None -> "net" - | Some x -> x - - prefix + s.Replace("v","") - |> FrameworkDetection.Extract) - |> Seq.map (fun o -> o.Value) - |> Seq.tryHead + try + seq {for outputType in this.Document |> getDescendants "TargetFrameworkVersion" -> + outputType.InnerText } + |> Seq.map (fun s -> + let prefix = + match this.GetTargetFrameworkIdentifier() with + | None -> "net" + | Some x -> x + + prefix + s.Replace("v","") + |> FrameworkDetection.Extract) + |> Seq.map (fun o -> o.Value) + |> Seq.tryHead + with + | _ -> None SinglePlatform(defaultArg framework (DotNetFramework(FrameworkVersion.V4)))