File tree Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 1+ #### 7.1.3 - 2022-03-30
2+ * Do not set binding redirects all the time - https://github.com/fsprojects/Paket/issues/4134
3+
14#### 7.1.2 - 2022-03-29
25* NuGet Cache: avoid duplicate nupkg file - https://github.com/fsprojects/Paket/pull/4135
36
Original file line number Diff line number Diff line change @@ -159,10 +159,7 @@ let private applyBindingRedirects isFirstGroup cleanBindingRedirects (allKnownLi
159159 use f = File.Open( configFilePath, FileMode.Create)
160160 config.Save( f, SaveOptions.DisableFormatting)
161161
162- match projectFile.OutputType, projectFile.GetAutoGenerateBindingRedirects() with
163- | ProjectOutputType.Exe, _ -> ignore()
164- | _, Some x when x.ToLower() = " true" -> ignore()
165- | _, _ -> projectFile.SetOrCreateAutoGenerateBindingRedirects()
162+ projectFile.SetOrCreateAutoGenerateBindingRedirects()
166163
167164let findAllReferencesFiles root =
168165 let findRefFile ( p : ProjectFile ) =
Original file line number Diff line number Diff line change @@ -1694,15 +1694,19 @@ module ProjectFile =
16941694 Kind = NugetPackageKind.DotnetCliTool
16951695 TargetFramework = None })
16961696
1697- let getAutoGenerateBindingRedirects ( project : ProjectFile ) = getProperty " AutoGenerateBindingRedirects" project
16981697 let setOrCreateAutoGenerateBindingRedirects ( project : ProjectFile ) =
1699- match getAutoGenerateBindingRedirects project with
1700- | Some _ -> project.Document
1701- |> getDescendants " AutoGenerateBindingRedirects"
1702- |> List.iter( fun x -> x.InnerText <- " true" )
1703- | _ -> match project.Document |> getDescendants " PropertyGroup" with
1704- | x :: _ -> x.AppendChild ( createNodeSet " AutoGenerateBindingRedirects" " true" project) |> ignore
1705- | _ -> ()
1698+ let nodes = project.Document |> getDescendants " PropertyGroup"
1699+ let mutable found = false
1700+ for node in nodes do
1701+ for autoNode in node |> getDescendants " AutoGenerateBindingRedirects" do
1702+ found <- true
1703+ autoNode.InnerText <- " true"
1704+
1705+ if not found then
1706+ match nodes with
1707+ | x :: _ ->
1708+ x.AppendChild ( createNodeSet " AutoGenerateBindingRedirects" " true" project) |> ignore
1709+ | _ -> ()
17061710
17071711 save false project
17081712
@@ -1800,8 +1804,6 @@ type ProjectFile with
18001804
18011805 member this.GetAssemblyName () = ProjectFile.getAssemblyName this
18021806
1803- member this.GetAutoGenerateBindingRedirects () = ProjectFile.getAutoGenerateBindingRedirects this
1804-
18051807 member this.SetOrCreateAutoGenerateBindingRedirects () = ProjectFile.setOrCreateAutoGenerateBindingRedirects this
18061808
18071809 static member LoadFromStream ( fullName : string , stream : Stream ) = ProjectFile.loadFromStream fullName stream
You can’t perform that action at this time.
0 commit comments