I want to be able to disable this. Why? I have solutions with multiple projects and assembly bindings are defined in external config file and linked with linkedConfiguration to web/app configs. I don't want NuGet adds assemblyBinding section to configs and edits all configs when package gets update or added.
I was thinking about this same scenario, and I can see why you want to do it.
I do have a question however: If your config is the same across multiple projects, are your package versions the same?
if they are the same - Then updating binding redirects should work correctly.
How do you plan to resolve it?
CC @pilchie @davidfowl If we choose to implement this, them for project.json scenarios we will need some common setting between NuGet and the project system.
If they are not the same - The config file is not applicable to all projects.
Yes, versions are the same :-) And it is because I'm working on large solution with multiple webs based on the same framework. Final webs are using the same version of assemblies as whole framework. There is no way how to use in final application more assemblies of different version.
So I just want to add references to package A to many other projects and use assembly binding in main web config. I can handle all package updates on my own, because that's how it works. Just update package on whole solution (or solutions - because it is modular framework) and update config. Then publish web with this config. Final web should contain assemblies from different solutions too, so nuget will never update all configs.
And other thing is - when I add package A to project XYZ, I don't want allow nuget system to touch any other projects and modify configs. Well, there should be some option for nuget to do it, but never ever do it as default. After every add or modify project using nuget I have to go a discard MANY changes to other project in solution. Mostly it is just added config section with bindings even configuration exists and is linked as extenal config.
Thanks for the explanation, this is something we could look at in one of the future releases.
+1, we never want binding redirects - we ship a set of dlls with correct references.
NuGet incorrectly insists we need bindings, tries to add them, performs very slowly doing so, and chucks out warnings of "item with the same key is already added". When it's finally finished we just delete all the app.configs from within solution explorer. It seems like adding a disable option in nuget.config will be easier than fixing all the problems with the feature. As a side note, does app.config even have any effect for dlls?
Turns out this is simpler to implement that getting the repro steps from https://github.com/NuGet/Home/issues/1580 :)
Design:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
...
<bindingRedirects>
<add key="skip" value="False" />
<add key="successRequired" value="False" />
</bindingRedirects>
</configuration>

Wow, awesome, that was like a 12 hour turnaround!
Most helpful comment
Design: