Oct 4, 2011 at 2:04 AM

  The add-bindingredirect command sounds awesome.  I haven't quite figured out how to make it work.  Are there any projects that demonstrate what a library should do to support it?  I have a library which is creating conflicts on newtonsoft and selenium if everything is not in sync.

Oct 4, 2011 at 4:56 AM

In recent NuGet builds, the binding redirect functionality actually happens automatically, so you shouldn't have to run it manually. What exactly is the problem you are seeing?

Oct 5, 2011 at 12:05 AM

The project had a couple indirect dependencies on Newtonsoft's Json.NET via nuget packages.  Every nuget package had a dependency on Json.NET 4.0.2, but at some point the project itself was referencing Json.NET 4.0.3.  Both versions of Newtonsoft were still in my packages folder, so I was able to fix it by dropping the reference to 4.0.3 and manually adding a reference to the 4.0.2 version).

Maybe the binding redirect behavior would have kicked in if the packages had references to different versions of Newtonsoft.

Does the binding redirect behavior help if I'm loading a DLL as a test DLL in NUnit?  In that case it uses NUnit's config file, so depending on where the redirects are written I imagine they might get missed.


Thanks for your help,

Frank Schwieterman

Oct 5, 2011 at 1:43 AM

No unfortunately the binding redirect feature does not work outside of the app's web.config. I'm not sure whether it would be possible to do, since we can't add config files with redirects for every exe that might be run...

Oct 5, 2011 at 2:57 AM

Would it update app.config files for projects in the solution?

Oct 5, 2011 at 7:00 AM

Yes, it updates either web.config or app.config depending on whether it's a web app or client app (e.g. a Console app).