U4-9655 - Html Agility pack assembly binding needs to be updated

Created by Dave Woestenborghs 21 Mar 2017, 16:33:03 Updated by Shannon Deminick 07 Apr 2017, 01:22:46

Tags: Unscheduled

Subtask of: UAASSCRUM-810

What did you do? Upgrade a old site to 7.6.0-beta that has code using html agility pack

What did you expect to happen? This keeps working

What actually happened? The site breaks with this error : System.IO.FileLoadException: Could not load file or assembly 'HtmlAgilityPack, Version=, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

This can be fixed by chaning assembly binding in web.config to


Shannon Deminick 23 Mar 2017, 00:00:35

Thanks for reporting! We'll need to update the web.config redirects but we can also do this in our BindingRedirect code too

Dave Woestenborghs 23 Mar 2017, 05:26:08

@Shannon are you referring to this part when talking about "our BindingRedirect code" ? https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Core/UmbracoApplicationBase.cs#L71

Than i should be able to create a PR for it


Shannon Deminick 23 Mar 2017, 05:31:57

This is the new code in 7.6: https://github.com/umbraco/Umbraco-CMS/blob/dev-v7.6/src/Umbraco.Core/BindingRedirects.cs

If you could make a PR that'd be great! Please use the Regex format instead of the string check

The last thing that would be needed is adding the web.config assembly redirect to the web.Release.config

Stephan 24 Mar 2017, 13:48:31

PR https://github.com/umbraco/Umbraco-CMS/pull/1828

review: upgrading from 7.5 should work

Dave Woestenborghs 24 Mar 2017, 13:59:24

@zpqrtbnk can you revert the PR... i wanted to pick this one up during the weekend :-p

Shannon Deminick 29 Mar 2017, 05:31:31

Sorry @Ddawoe , didn't mean to step on your toes but we've gotta pull this in now since due to timeframes.

Shannon Deminick 29 Mar 2017, 05:33:24

Actually @dawoe you can still make the PR to do it via code, this PR is only updating the config.

Shannon Deminick 29 Mar 2017, 05:34:58

But @dawoe that would need to be done/today or tomorrow, otherwise we'll have to put it in before Friday

Dave Woestenborghs 29 Mar 2017, 05:46:26

@shawazza no worries... No toes stepped on... Was thinking that the smiley in my comment that clear

Shannon Deminick 30 Mar 2017, 06:04:16

I've added and tested the code redirect: dbdee5fc2cd0c596a23bda1c43788ad7cf1de97b

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: False

Fix Submitted:

Affected versions: 7.6.0

Due in version: 7.6.0

Sprint: Sprint 55

Story Points: