Skip to content

Do not change the AutoGenerateBindingRedirects for exe output type - #3471

Merged
forki merged 1 commit into
fsprojects:masterfrom
BlythMeister:bindingRedirect
Jan 13, 2019
Merged

forki merged 1 commit into
fsprojects:masterfrom
BlythMeister:bindingRedirect

Conversation

@BlythMeister

Copy link
Copy Markdown
Contributor

This has some weird behavior when you set to true on exe output types.

It's safer to leave them alone and let the user decide to enable if they wish.

Currently, i am having to revert the paket change so as to keep my actual redirects rather than those auto generated.

Stupidly in MSBuild, this switch is ONLY used in exe output types to generate the redirects.
But when set on Library output types, it prevents warnings...slow clap for msbuild using the same property for 2 tasks...

@BlythMeister

Copy link
Copy Markdown
Contributor Author

Are these failures related to my change? I can't see how they are...i ran the build locally and they go green.

@BlythMeister

Copy link
Copy Markdown
Contributor Author

@forki any chance fmof getting this (or something similar) in?

Causing me issues when I forget to revert

@forki
forki merged commit 9d62958 into fsprojects:master Jan 13, 2019
@blumu

blumu commented Jan 17, 2019 •

Copy link
Copy Markdown

@forki Any reason why this option should not be left alone for DLLs as well, not just for EXE? We are facing the same issue with our Web projects (DLL). Paket resets AutoGenerateBindingRedirects to true everytime we run paket install. Another side effect is that it rotates the manually configured binding redirects in the web.config file (Even though we use redirects: off in paket.dependencies). So bascially paket install is not idempotent: each time we run it we get a new web.config file, and we have to manually revert the changes.

match projectFile.OutputType, projectFile.GetAutoGenerateBindingRedirects() with
| ProjectOutputType.Exe, _ -> ignore()
| _, Some x when x.ToLower() = "true" -> ignore()
| _, _ -> projectFile.SetOrCreateAutoGenerateBindingRedirects()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should not the last branch also check that redirects is not set to off?

@BlythMeister

Copy link
Copy Markdown
Contributor Author

Originally this was put to suppress build warnings. I'm starting to think actually we should remove since msbuild appears to have been fixed

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