tags:

views:

939

answers:

2

I have migrated my application from NHibernate 1.2.1 to NHibernate 2.0.1. Now i am geting the error "Version Conflict error while compiling". It shows that application still using the NHibernate V1 but i have changed the Version by deleteing the old dll and added the new dll in application refference.

The only thing i have not changes is NHibernate.Caches.SysCache.SysCacheProvider and it is still pointing to the old version "1.0.1".

How could i migrate this, please help me

-Gunasekaran sambandhan

+2  A: 

NHibernate.Caches is part of the contrib package. You need to download the latest version and update your assembly.

Darin Dimitrov
I have downloaded the latest version of caches "Version=2.0.0.1001" and my NHibernate Version is the same Version=2.0.0.1001. but i am getting the below error while compilingcould not instantiate CacheProvider: NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache
guna Samba
Could you please post the relevant lines of your code that generate the compile-time error? Normally you should configure NHibernate's second level cache in app.config so you shouldn't get any compile-time errors.
Darin Dimitrov
darin, i tried to add but character restriction not allowing me to post, So i posted as seperate question and the link is here for your verfiction http://stackoverflow.com/questions/839112/problem-while-migrating-nhibernate-to-higher-version
guna Samba
A: 

U can use an Assemmbly redirect provided in your application config file or the webconfig file like this <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="NHibernate" publicKeyToken="AA95F207798DFDB4" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-2.1.0.2001" newVersion="2.1.0.1002"/> </dependentAssembly> </assemblyBinding> </runtime>