AppDomain Probing

  • Thread starter Thread starter A. Elamiri
  • Start date Start date
A

A. Elamiri

Hello,

I created a small app which acts as a services manager. I basically drop a
DLL in a Services folder and set the frequency through the application for
how often do I want the code in the assembly to run (scheduler).

I created a seperate AppDomain here is the code:
....
AppDomainSetup ads = new AppDomainSetup();
string path =
Application.ExecutablePath.Replace(System.IO.Path.GetFileName(Application.Ex
ecutablePath),"");
ads.ApplicationBase = path + "Services";
ads.PrivateBinPathProbe = path + "Services";
ads.PrivateBinPath = path + "Services";
ads.DisallowBindingRedirects = true;
Tools.ShowInfo(path);
SvcBin = AppDomain.CreateDomain("ServiceAssemblies",null,ads);

....

The above code was placed in the constructor. When I look through the
assemblies (GetAssemblies) to see a listing of all classes loaded, I don't
see the classes in the dll located in that services folder, which made me
think that it is not being probed. Anything I'm doing wrong?
 
yeah it's true... I didn't know that

--
Abdellah Elamiri
..net Developer
Efficacy through simplicity
Anna said:
Hi,

I am maybe wrong on this one by I thought the assembly doesn't accually
get loaded untill you excetute methond on one of its types. I thought that
was the whole point of even if you have a lot of assemblies referenced in
your app not all of them will be loaded upon app start.
 
Back
Top