On May 10, 2:38 pm, "Dave Shooter"
<alwayskeepitloa...@delete.me.googlemail.comwrot e:
"IceMan" <andreas.sk...@gmail.comwrote in message
news:11*********************@n59g2000hsh.googlegro ups.com...
Hi,
I am using the configuration object and passing it a Assembly object
to load. The assembly object i pass in is from a dll which is in a
different folder then the Nhibernate dll.
The AddAssembly(Assembly assembly) function throws me an Error saying
it can't load the configuration hbm.xml file because it can't load the
assembly in the hbm.xml file.
Why does NHibernate try to load the Assembly again??
I think NHibernate tries to load the mapping files from the assembly when
using Configuration.AddAssembly(Assembly asm). Has the hbm.xml file been
compiled into the assembly as an Embedded Resource?
Yes, i have made the hbm.xml file an embedded resource, and it works
if the nhibernate and the assembly with the mapping file is in the
same folder.
But it appears that NHibernate tries to load the assembly from the
location NHibernate was loaded from.
But i don't understand why the assembly has to be loaded again. As I
am guesing it most allready be loaded when i have been able to create
other types from that assembly.