- -

Updating Assembly Redirects with NuGet

This is one of those "note to self" posts. Every time i've got something like this:

I'm telling NuGet to explicitly re-write assembly redirects in project .config file based on the installed NuGet packages:

PM> Add-BindingRedirect

But not everyone knows that we can do this for all projects in solution:

PM> Get-Project –All | Add-BindingRedirect

NuGet will get all projects and for every project, add the correct assembly binding redirects again. Compile, run, and continue your day without rage.

Enjoy!

Photo by John Lockwood