I've just downloaded the trunk version and found that it fails with the error "Could not load file or assembly 'NHibernate, Version 1.0.2.0..." The version in the trunk is 1.0.3.0. Is the assembly version hardcoded somewhere? or is the solution to use the 1.0.2.0 version of NHibernate.
Cheers,
Mark
The bindingRedirect didn't seem to be having any effect, so I made another copy from the trunk and tried again - fine this time.
mpwThe bindingRedirect didn't seem to be having any effect, so I made another copy from the trunk and tried again - fine this time.
Hmmm, do you have an explanation for this? I wonder why the bindingRedirect didn't work the first time.
martijnbHmmm, do you have an explanation for this? I wonder why the bindingRedirect didn't work the first time.
Martijn,
I couldn't find any reason why the binding redirect didn't work. I played around with various versions of the NHibernate DLLs with no luck and all the documentation said the method was correct - so it should have worked. I downloaded a new version from SVN just to check my sanity.
Mark
Believe it or not, but just right now, I'm having the same issue. It just happened while in the middle of integrating the Gallery module.
I hope I can get my finger behind the issue now, but I tried lots of things and nothing worked.
*sigh*
It "feels" like the assembly is being referenced before the config is read and so the binding redirect is ignored. The castle code was throwing the exception in my case as it references the 1.0.2.0 version of NHibernate. At the moment I'm not getting the error but if it comes back I'll try document what I did to cause it.
Mark
A workaround for the problem was to manually add the bindingredirect to the .NET 2.0 framework configuration. It now works, but I still haven't got a clue why the section in the web.config wasn't working. I even put some typos in it (wrong assemblyname) and that didn't affect anything, so it looks like the entire section isn't being read anymore.
For me, it doesn't even work, if I put the settings on machine level?!
You won't believe this: after removing the xmlns from the configuration element in the web.config, the bindingredirect works again! :s
See
this page for more info.