I'm working on an old system that is using NHibernate 3 and spring for DI, I have to do some refactor on this solution. some of the projects of the solution was using NHibernate 1.2, I changed them to NHibernate 3. Now the only version of the NHibernate that is used in entire solution is 3.
Now the problem is when I try to load any of the web services in the solution, system try to load a type from NHibernate 1.2, I have tested published project in another system and it is working just fine, and it should be a problem with my system, it just give me: Could not load type 'NHibernate.Event.ListenerType' from assembly 'NHibernate, Version=1.2.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4'.
Can anyone help me find out why CLR is trying to load a type from an unreferenced assembly?
Thanks to every one that tried to help me, but I found the response.
I have .NET Reflector on my system and once upon a time, I used that to reflect NHibernate on my system and it was version 1.2.1.4000, it created a copy of my DLL in its cache and it was preferred in load order. I deleted the cache and now everything is working as expected
Same problem happens with me many times but with different dlls
I will share what steps I followed in order to get rid from this problem
I hope this will work with you
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With