U4-5276 - Installing packages ignore bindingRedirect, shows warnings

Created by Stephan 25 Jul 2014, 10:14:50 Updated by Sebastiaan Janssen 06 Aug 2014, 08:48:53

The package installer checks that the dependencies required by the package can be satisfied. This is done by using Assembly.ReflectionOnlyLoad which does not respect bindingRedirect (see http://blogs.microsoft.co.il/sasha/2010/06/09/assemblyreflectiononlyload-ignores-assembly-binding-redirects/). If a dependency requires a binding redirect in order to be satisfied, the package installer thinks that it cannot be satisfied and raises a warning.


Sebastiaan Janssen 31 Jul 2014, 08:21:14

Just so I can find this again later, the error looks like this:

An error occurred while loading a referenced assembly 'Newtonsoft.Json' see error log for full details

Stephan 31 Jul 2014, 12:48:55

Happens in PackageBinaryByteInspector and PackageBinaryInspector - wondering why we're having two classes duplicating 80% of their code?

Stephan 05 Aug 2014, 16:09:59

Pushed f3ca9e067bcf8ee5bdc3d0fe073c2773c72d8ed3 to 7.1.5 that should fix it -- at least some of my packages that complained about missing System.Net.Http, now install correctly. Would appreciate if @Shandem had a look though.

Stephan 05 Aug 2014, 16:18:16

Sounds good.

Sebastiaan Janssen 06 Aug 2014, 08:48:53

Helps for Contour as well (html agility pack), thanks!

Priority: Normal

Type: Bug

State: Fixed

Assignee: Stephan

Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.1.4

Due in version: 7.1.5


Story Points: