I've upgraded a backup copy of my website from 4.7.1.1 to 4.8 and now I seeing XSLT errors on all my web pages.
We I go to backend of umbraco and visualize an XSLT file it gives the following error:
Error parsing the XSLT:
System.Exception:
Unable to load one or more of the types in assembly
'Fizzler.Systems.HtmlAgilityPack, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null'. Exceptions were thrown:
System.IO.FileLoadException: Could not load file or assembly
'HtmlAgilityPack, Version=1.3.0.0, 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)
System.IO.FileLoadException: Could not load file or assembly
'HtmlAgilityPack, Version=1.3.0.0, 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)
System.IO.FileLoadException: Could not load file or assembly
'HtmlAgilityPack, Version=1.3.0.0, 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)
System.IO.FileLoadException: Could not load file or assembly
'HtmlAgilityPack, Version=1.3.0.0, 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)
at
umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly
assembly, Type attribute)
at
umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type
attribute)
at umbraco.macro.GetXsltExtensionsImpl()
at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String
cacheKey, Object syncLock, CacheItemPriority priority,
CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency,
TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem)
at umbraco.macro.GetXsltExtensions()
at umbraco.macro.AddMacroXsltExtensions()
at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML,
XslCompiledTransform xslt, Dictionary`2 parameters)
at
umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object
sender, EventArgs e)
The HTMLAgilityPack in 4.8 is version 1.4.5.0, so somehow it's still looking for the old version that I had in 4.7.1.1.
It's a similar issue to what we have on uComponents with Umbraco 4.8 - specifically with our reference to Lucene.Net. More details here: http://j.mp/umb48-breaks-ucomponents
You should be able to take the same approach, using <assemblyBinding> to redirect the specific version of HtmlAgilityPack:
The upgrade files had the new HtmlAgilityPack.dll in the bin folder, but version 4.7.1.1 had and old version of that file PLUS another file called Fizzler.Systems.HtmlAgilityPack.dll. When I removed that .dll file, suddenly all my XSLT's started working again.
So, if anyone else runs into this problem, delete the Fizzler.Systems.HtmlAgilityPack.dll after you upgrade.
The "Fizzler.Systems.HtmlAgilityPack.dll" isn't part of the Umbraco distribution - so make sure that it's not part of a 3rd-party package that you need/use.
Hmm, I checked all my installed packages and none of them reference that .dll. Whatever it is, looks like it's been part of my Umbraco site since version 4.6.
xslt errors after upgrade to 4.8
I've upgraded a backup copy of my website from 4.7.1.1 to 4.8 and now I seeing XSLT errors on all my web pages.
We I go to backend of umbraco and visualize an XSLT file it gives the following error:
Error parsing the XSLT:
System.Exception: Unable to load one or more of the types in assembly 'Fizzler.Systems.HtmlAgilityPack, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown: System.IO.FileLoadException: Could not load file or assembly 'HtmlAgilityPack, Version=1.3.0.0, 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) System.IO.FileLoadException: Could not load file or assembly 'HtmlAgilityPack, Version=1.3.0.0, 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) System.IO.FileLoadException: Could not load file or assembly 'HtmlAgilityPack, Version=1.3.0.0, 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) System.IO.FileLoadException: Could not load file or assembly 'HtmlAgilityPack, Version=1.3.0.0, 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) at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute) at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute) at umbraco.macro.GetXsltExtensionsImpl() at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) at umbraco.macro.GetXsltExtensions() at umbraco.macro.AddMacroXsltExtensions() at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object sender, EventArgs e)
The HTMLAgilityPack in 4.8 is version 1.4.5.0, so somehow it's still looking for the old version that I had in 4.7.1.1.
Any ideas on what may have gone wrong?
Hi Jennifer,
It's a similar issue to what we have on uComponents with Umbraco 4.8 - specifically with our reference to Lucene.Net. More details here: http://j.mp/umb48-breaks-ucomponents
You should be able to take the same approach, using <assemblyBinding> to redirect the specific version of HtmlAgilityPack:
You'll just need to get a copy of HtmlAgilityPack 1.3.0.0 and place it in the /bin/legacy folder.
Good luck!
Cheers, Lee.
Thanks!
Actually, I got my XSLT working.
The upgrade files had the new HtmlAgilityPack.dll in the bin folder, but version 4.7.1.1 had and old version of that file PLUS another file called Fizzler.Systems.HtmlAgilityPack.dll. When I removed that .dll file, suddenly all my XSLT's started working again.
So, if anyone else runs into this problem, delete the Fizzler.Systems.HtmlAgilityPack.dll after you upgrade.
Hi Jennifer,
The "Fizzler.Systems.HtmlAgilityPack.dll" isn't part of the Umbraco distribution - so make sure that it's not part of a 3rd-party package that you need/use.
Cheers, Lee.
Hmm, I checked all my installed packages and none of them reference that .dll. Whatever it is, looks like it's been part of my Umbraco site since version 4.6.
No worries, glad that you've resolved the issue.
Cheers, Lee.
is working on a reply...