I have an AppDomain that must load a simple assembly that has only one class
with one method and it does not work... I receive this exception : "Could
not load file or assembly 'ModuleLoader.dll' or one of its dependencies. The
system cannot find the file specified."
Does anyone have an idea of something I'm missing?
Thanks
ThunderMusic
Expand|Select|Wrap|Line Numbers
- *** Main App (calling method) ***
- AppDomainSetup ads = new AppDomainSetup();
- ads.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;
- ads.PrivateBinPath = AppDomain.CurrentDomain.BaseDirectory;
- ads.DisallowBindingRedirects = false;
- ads.DisallowCodeDownload = true;
- m_CurrentMonitorAppDomain = AppDomain.CreateDomain("MonitorLoader", null,
- ads);
- // The following call fails
- MonitoringModuleLoader mml =
- (MonitoringModuleLoader)m_CurrentMonitorAppDomain.CreateInstanceAndUnwrap("ModuleLoader.dll",
- "ModuleLoader.MonitoringModuleLoader");
- *** The "ModuleLoader" library ***
- namespace ModuleLoader
- {
- public class MonitoringModuleLoader : MarshalByRefObject
- {
- public MonitoringModuleLoader()
- {
- }
- public MonitorBase Load(byte[] LibBytes, string ModuleName)
- {
- return null;
- }
- }
- }