-
Notifications
You must be signed in to change notification settings - Fork 526
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
Paket 3 unconditionally removes all binding redirects from Web.config #1665
Comments
@mrinaldi @isaacabraham can you please comment on this one? thanks |
I think this could be a result of me removing the --hard parameter. |
I think I will bring this back as new parameter |
Two points:
|
"redirects: off" is not really related this |
Another consideration: since .NET 4.5.1 VS can generate binding redirects pretty much automatically with |
We can't assume VS exists. |
True, but in this case actually msbuild is doing it and we rely on it anyway. |
let me readd the parameter - this changes the default back to paket 2 mode. I think this will work for you. |
Anyway my point is - there are two possible kinds of the problems:
Between those two #2 is much better and safer. If not sure - do not touch it rather! |
--clean-redirects set to Yes would clean ALL redirects again - those added by Paket and those which were not. There is no way to separate them. |
I understand that simply --clean-redirects:No would just work for us, but now I'm thinking about potential users confusion about that new option. I doubt it is needed. |
it is needed ;-) |
--clean-redirects will remove all redirects that are not set by paket. this is a command you only run once and after that all your redirects are completely under paket's control. |
Meaningful action is not removing all binding redirects altogether. Meaningful action is to try to set binding redirects correctly, which means some may need to be added, some may need to be removed and some may need to be adjusted. That's the functionality I would expect from "redirects: on". When it is set to off I expect Paket to simply bypass opening of any config files. |
-- --clean-redirects will remove all redirects that are not set by paket. So are they marked somehow? |
Anyway, it is time for me to stop burning midnight oil and hit the bed. I trust you to implement whatever solution you deem correct as long as there is an option to leave config files alone :-) |
Whoa. Just read the last part of this. @forki are we saying that the new defaults in v3 will remain or has been reverted back to v2? |
It's reverted to v2 behavior. This means manual redirects are only touched
|
So hard not by default? |
yes. not for this case, but for everything else where hard was used. TBH i think it was unfortunate to use the same parameter for this and the other use case in the first place. |
I'm not following the minute details of the issue, but it seems important to preserve existing bindings, unless those are related to paket managed assembly dependencies, in which case paket should add/update those. What I'm reading is that @konste had custom bindings that are not related to paket dependencies and that he likes to get those preserved (disregarding I'm not seeing how that will address @konste issue though, he'd expect paket to not touch any redirect (he has many entered manually) besides those related to |
Yes we don't touch automatically anymore.
|
@forki gotcha thanks! 👍 |
WebConfigRepro.zip
Small Web project attached as a repro. Paket Install command removes all binding redirects from Web.config file.
I have tried with "redirects: off" and "redirects: on" at the top of paket.dependencies - no change in behavior.
It also worth nothing to mention that it still forcibly adds a space before XML tag closing.
And one more - Paket changes encoding of Web.config file by inserting BOM symbol in the beginning.
All those three things are better be left alone, at least when "redirects: off" explicitly specified.
The text was updated successfully, but these errors were encountered: