Load assembly with hibernate DB access error
Hello,
could you please give me some advice - how to solve the problem.
I have Master program and slave. Master program loads slave prog assembly and does some operations using slave assembly public methods. Each of them use FluentNHibernate to access DB.
Once i load slave assembly and initialize Type with activator, any method which uses Nhibernate in slave rises exception:
Could not compile the mapping document: (XmlDocument)
Whts this about?
Any advice would be welcome!
2 Posted by Arkady on 19 Jul, 2010 07:05 AM
Any suggestion?
Or i seem will have to stop using FH on side of loaded asseblys, and use config files or so... =(
3 Posted by Arkady on 20 Jul, 2010 12:14 PM
Solved
Support Staff 4 Posted by James Gregory on 22 Jul, 2010 11:01 AM
Care to share the solution invade anyone else encounters the issue?
5 Posted by Arkady on 23 Jul, 2010 08:16 AM
Solution pretty simple.
Main problem - .NET could not locate map class for loaded assembly.
Solution:
Put handler to workout this kind of situations - AppDomain.CurrentDomain.AssemblyResolve +=
Handler body:
static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)