On several different packages like SquishIt and DotNetOpenAuth i get an error saying:
Failed to generate binding redirects for 'MyProject'. Object reference not set to an instance of an object.
I've seen a lot of post about other people having problems with "binding redirects" but not found a single reference to this problem combined with "Object reference not set to an instance of an object.".
What exactly is NuGet trying to do at this stage? Does it try to update the binding redirects in Web.Config? Could i have some issue with my Web.Config? How can i go about debugging this?
I shall say that this does not happen in a "clean" project.
I had the same issue mucking around with MVC versions in one project. I think it could happen for any NuGet package that tries to add Binding Redirects to your config file.
I ended up renaming "Web.config" to "Web.Temp.Config", then installing the package.
I then I manually merged the changes that the package put into my config file into the temp one, then deleted it and renamed my original back to web.config.
This resolved the issue for me - hopefully it helps you.
In my case, update NuGet Package Manager solves the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With