Was just messing around and tried an upgrade to 2.5 from 2.1 and everything seemes to go okay...until i checked out my XSLT macros. Something aint right and they are all broken. I will probably convert to Razor but would be good to know what caused it.
Any ideas anyone?
Kenny
Error when trying to save XSLT - (there are lots more of these lines...)
Error occured
System.Exception: Unable to load one or more of the types in assembly 'Umbraco.Courier.Persistence.V4.NHibernate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown: System.IO.FileLoadException: Could not load file or assembly 'FluentNHibernate, Version=1.2.0.712, Culture=neutral, PublicKeyToken=8aa435e3cb308880' 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 'FluentNHibernate, Version=1.2.0.712, Culture=neutral, PublicKeyToken=8aa435e3cb308880' 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 'FluentNHibernate, Version=1.2.0.712, Culture=neutral, PublicKeyToken=8aa435e3cb308880' 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 'FluentNHibernate, Version=1.2.0.712, Culture=neutral, PublicKeyToken=8aa435e3cb308880' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Update: I noticed The Courier reference in the first line so tried uninstalling that (to no avail) and I am now getting a different error:
Kenny
Error occured
System.Exception: Unable to load one or more of the types in assembly 'NHibernate.Caches.SysCache2, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=6876f2ea66c9f443'. Exceptions were thrown: System.IO.FileLoadException: Could not load file or assembly 'NHibernate, Version=3.2.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' 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 'NHibernate, Version=3.2.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' 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.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
Update: I installed uCommerce 2.5 again after I had removed courier and everything seemed to work fine after that. XSLT macros were working again. I reinstalled Courier v2 again and the same thing happened.
The reason is that Courier and uCommerce uses the same dependencies, in this case Fluent NHibernate and NHibernate, but different versions. This is a variant of the old problem known as DLL hells in COM on Windows. The difference here is that there's a nice solution avaialble called assembly redirect.
For Umbraco 5 this will a non-issue as it comes with a version of NHibernate out of the box, so we don't have to ship it ourselves thus no clashes will occur.
v2.5 upgrade broke my XSLT macros :(
Hi Guys,
Was just messing around and tried an upgrade to 2.5 from 2.1 and everything seemes to go okay...until i checked out my XSLT macros. Something aint right and they are all broken. I will probably convert to Razor but would be good to know what caused it.
Any ideas anyone?
Kenny
Error when trying to save XSLT - (there are lots more of these lines...)
Error occured
System.Exception: Unable to load one or more of the types in assembly 'Umbraco.Courier.Persistence.V4.NHibernate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown:
System.IO.FileLoadException: Could not load file or assembly 'FluentNHibernate, Version=1.2.0.712, Culture=neutral, PublicKeyToken=8aa435e3cb308880' 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 'FluentNHibernate, Version=1.2.0.712, Culture=neutral, PublicKeyToken=8aa435e3cb308880' 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 'FluentNHibernate, Version=1.2.0.712, Culture=neutral, PublicKeyToken=8aa435e3cb308880' 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 'FluentNHibernate, Version=1.2.0.712, Culture=neutral, PublicKeyToken=8aa435e3cb308880' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Update: I noticed The Courier reference in the first line so tried uninstalling that (to no avail) and I am now getting a different error:
Kenny
Error occured
System.Exception: Unable to load one or more of the types in assembly 'NHibernate.Caches.SysCache2, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=6876f2ea66c9f443'. Exceptions were thrown:
System.IO.FileLoadException: Could not load file or assembly 'NHibernate, Version=3.2.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' 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 'NHibernate, Version=3.2.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' 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.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
Update: I installed uCommerce 2.5 again after I had removed courier and everything seemed to work fine after that. XSLT macros were working again. I reinstalled Courier v2 again and the same thing happened.
Is something clashing somewhere?
Kenny
Hi Kenny,
The reason is that Courier and uCommerce uses the same dependencies, in this case Fluent NHibernate and NHibernate, but different versions. This is a variant of the old problem known as DLL hells in COM on Windows. The difference here is that there's a nice solution avaialble called assembly redirect.
Assembly Redirect is described in this MSDN article.
For Umbraco 5 this will a non-issue as it comes with a version of NHibernate out of the box, so we don't have to ship it ourselves thus no clashes will occur.
Here is the working bindingRedirect for
uCommerce 2.5.2.0
NHibernate.dll 3.2.0.4000
FluentNHibernate.dll 1.3.0.0
Courier 2.5.4.1
NHibernate.dll 3.1.0.4000
FluentNHibernate.dll 1.2.0.712
uCommerce 2.6 uses the same version of NHibernate and FluentNHibernate as Courier to avoid this in the future.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.