-
Notifications
You must be signed in to change notification settings - Fork 527
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
Fix for #2573 #3120
Conversation
Adding AutoGenerateBindingRedirects automatically when BindingRedirects are added to a config file
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 |
First is usually to go green ;) |
Error is unrelated
Matthias Dittrich <[email protected]> schrieb am Fr., 16. März 2018,
10:07:
… First is usually to go green ;)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3120 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNLF8uBOxrqPgRU6XmCmcM1OnWyHXks5te4DUgaJpZM4Sr4F1>
.
|
|> List.iter(fun x -> x.InnerText <- "true") | ||
else | ||
let propertyGroups = project.Document |> getDescendants "PropertyGroup" | ||
if propertyGroups.IsEmpty |> not then |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
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.