NuGet "Failed to create a binding redirect for my project" with the error "Object reference not installed in the object instance."

In several different packages, such as SquishIt and DotNetOpenAuth, I get an error:

Failed to create binding redirects for "MyProject". The reference to the object is not installed in the instance of the object.

I have seen many reports that other people have problems with "binding redirection", but no links to this problem were found in combination with "Link to an object not installed on an instance of an object".

What exactly is NuGet trying to do at this point? Is it trying to update binding redirects in Web.Config? Can I have some problems with my Web.Config? How can I debug this?

I will say that this does not happen in a "clean" project.

+6
source share
2 answers

I had the same problem as in MVC versions in one project. I think this can happen for any NuGet package that is trying to add Binding Redirects to your configuration file.

In the end, I renamed "Web.config" to "Web.Temp.Config" and then installed the package.

Then I manually merged the changes that the package put into my configuration file into a temporary one, then deleted it and renamed it back to web.config.

This solved the problem for me - hope this helps you.

+8
source

In my case, updating the NuGet Package Manager solves the problem.

0
source

All Articles