Re: Nhibernate



On May 10, 2:38 pm, "Dave Shooter"
<alwayskeepitloa...@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
"IceMan" <andreas.sk...@xxxxxxxxx> wrote in message

news:1178798174.443203.63140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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.

.



Relevant Pages

  • Re: Nhibernate
    ... "AppDomain.CurrentDomain.AssemblyResolve" and looking for the dll my ... NHibernate does not try to reload the assembly. ... I am using the configuration object and passing it a Assembly object ... it can't load the configuration hbm.xml file because it can't load the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Type convertsion from string
    ... ExtendedCustomer type when it wants to load Customer type? ... subclassing - in theory should work; currently seeing an NHibernate ... I generated database class in VCSE 2008 Beta 2 using PostgreSQL LINQ driver. ...
    (microsoft.public.dotnet.languages.csharp)
  • Nhibernate
    ... I am using the configuration object and passing it a Assembly object ... different folder then the Nhibernate dll. ... it can't load the configuration hbm.xml file because it can't load the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Nhibernate
    ... I am using the configuration object and passing it a Assembly object ... different folder then the Nhibernate dll. ... it can't load the configuration hbm.xml file because it can't load the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Nhibernate
    ... NHibernate does not try to reload the assembly. ... I am using the configuration object and passing it a Assembly object ... it can't load the configuration hbm.xml file because it can't load the ... Yes, i have made the hbm.xml file an embedded resource, and it works ...
    (microsoft.public.dotnet.languages.csharp)