Sitelet https://github.com/fsprojects/Paket/pull/3120
Skip to content

Fix for #2573 - #3120

Merged
forki merged 3 commits into
fsprojects:masterfrom
BlythMeister:AssemblyFix
Mar 16, 2018
Merged

forki merged 3 commits into
fsprojects:masterfrom
BlythMeister:AssemblyFix

Conversation

@BlythMeister

@BlythMeister BlythMeister commented Mar 15, 2018 •

Copy link
Copy Markdown
Contributor

Fixes #2573 by adding AutoGenerateBindingRedirects automatically when BindingRedirects are added to a config file.

This change is documented here: https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection
By enabling the setting it prevents MSBuild trying to do a unification.

Adding AutoGenerateBindingRedirects automatically when BindingRedirects are added to a config file
@BlythMeister

Copy link
Copy Markdown
Contributor Author

This is the suggested approach to take to get around the MSBuild warnings thrown by FSharp.Core in some situations when using MSBuild 15.6 if you don't target the latest FSharp.Core nuget package.

See: dotnet/fsharp#4517

@BlythMeister

Copy link
Copy Markdown
Contributor Author

@forki @matthid what is the process to getting this reviewed and added?

@matthid

matthid commented Mar 16, 2018

Copy link
Copy Markdown
Member

First is usually to go green ;)

@forki

forki commented Mar 16, 2018 via email

Copy link
Copy Markdown
Member

|> List.iter(fun x -> x.InnerText <- "true")
else
let propertyGroups = project.Document |> getDescendants "PropertyGroup"
if propertyGroups.IsEmpty |> not then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change to pattern matching

match propertyGroups with | x :: _ -> x.AppendChild (createNodeSet "AutoGenerateBindingRedirects" "true" project) |> ignore | _ -> ()


let getAutoGenerateBindingRedirects (project:ProjectFile) = getProperty "AutoGenerateBindingRedirects" project
let setOrCreateAutoGenerateBindingRedirects (project:ProjectFile) =
if (getAutoGenerateBindingRedirects project).IsSome then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here please use pattern matching instead of if + isSome

@forki
forki merged commit 1b9eb79 into fsprojects:master Mar 16, 2018
@BlythMeister
BlythMeister deleted the AssemblyFix branch March 16, 2018 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants