Search code examples
nhibernates#arp-architectureassembly-resolutionsecond-level-cache

NHibernate 2nd level cache provider for NHibernate 2.1.1.4000


I am using s#arp which is built against NHibernate 2.1.1.4000, However I would like to use NHibernate.Caches.SysCache as my second level cache. However the Nhibernate contrib caches are built against NHibernate 2.1.2.4000 which obviously gives me a problem.

Can anyone point me to a URL that I can download NHibernate.Caches.SysCache.dll that is built against NHibernate 2.1.1.4000

Or is there another 2nd level cache provider that is easy to implement and is built against NHibernate 2.1.1.4000

Thanks


Solution

  • I would update to the 2.1.2 build of NHibernate core and NHCache from nhforge.org, and use an assembly binding redirect to update the s#arp reference.

    <configuration>
       <runtime>
          <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
             <dependentAssembly>
                <assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4"/>
                <bindingRedirect oldVersion="2.1.1.4000" newVersion="2.1.2.4000"/>
             </dependentAssembly>
          </assemblyBinding>
       </runtime>
    </configuration>