Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #2573 #3120

Merged
merged 3 commits into from
Mar 16, 2018
Merged

Fix for #2573 #3120

merged 3 commits into from
Mar 16, 2018

Conversation

BlythMeister
Copy link
Contributor

@BlythMeister BlythMeister commented Mar 15, 2018

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
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
Contributor Author

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

@matthid
Copy link
Member

matthid commented Mar 16, 2018

First is usually to go green ;)

@forki
Copy link
Member

forki commented Mar 16, 2018 via email

|> List.iter(fun x -> x.InnerText <- "true")
else
let propertyGroups = project.Document |> getDescendants "PropertyGroup"
if propertyGroups.IsEmpty |> not then
Copy link
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 | _ -> ()

@@ -1671,6 1671,22 @@ module ProjectFile =
Kind = NugetPackageKind.DotnetCliTool
TargetFramework = None })

let getAutoGenerateBindingRedirects (project:ProjectFile) = getProperty "AutoGenerateBindingRedirects" project
let setOrCreateAutoGenerateBindingRedirects (project:ProjectFile) =
if (getAutoGenerateBindingRedirects project).IsSome then
Copy link
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.

None yet

3 participants