Really? Are we the only ones who use NHibernate together with Episerver? Come on out of the closet! =)
I've located the problem to the package Episerver.CommonFramework.
When this package is added, binding redirects are overwritten with old versions of NHibernate and Iesi.Collections
Before:
<dependentAssembly> <assemblyIdentity name="Iesi.Collections" publicKeyToken="aa95f207798dfdb4" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000" /> </dependentAssembly>
After:
<dependentAssembly> <assemblyIdentity name="Iesi.Collections" publicKeyToken="aa95f207798dfdb4" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-1.0.0.3" newVersion="1.0.0.3" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-1.2.0.4000" newVersion="1.2.0.4000" /> </dependentAssembly>
Also, upon adding this package, it messes up the formatting of the binding redirects by adding them all on one line.
I should really report this as a bug :-/
Edit: Reported as #118396
I see that this is in the CMS forum, but could it be that you are getting the CommonFramework reference from Commerce? In Commerce 8 we dropped the dependency to CommonFramework so unless you need CommonFramework you should be able to get rid of this problem.
Indeed this is a Commerce project. Didn't know the dependency was dropped. After a couple of uninstall-package and some manual web.config editing we're free! No more Episerver.CommonFramework =) Thanks Magnus for the tip!
Does this mean we kan kill all tblEpiserverCommon* tables in our CMS db? O_o
Yes, there is a cleanup script included in the tools\remove_commonframework folder in the nuget package.
We are using NHibernate 3.3 in our project for custom data. But ever time we upgrade through NuGet we have to manually handle the changes around NHibernate and Iesi.Collections due to the fact that Epi *really* wants to use NHibernate 1.2. Both project references and runtime dependencies are broken. Even if we make a side-by-side runtime config, it is not guaranteed to be intact after the upgrade.
We just spent a very uninspiring 1.5 hours upgrading from release 29 to release 30 mostly thanks to this.
Does anybody know why Episerver uses NHibernate 1.2, and/or is there any plan to get rid of this dependency or upgrade it? It's either that or we have to find another OR mapper... :-/