views:

9

answers:

0

I have a windows service that works fine in my dev environment. The build process copies all referenced DLL's into the bin/debug folder. I run installutil from the bin/debug folder. Service starts fine.

Now, I've created a new folder for the service executable. c:\MyService, and the DLLs are in c:\MyService\libraries. Obviously, this doesn't work, I get the FileNotFoundException. First DLL on the list is log4net.

I've tried adding a configuration file which sets the PrivateBinPath to "libraries".

I've tried...

  AppDomainSetup librariesDomain = new AppDomainSetup();
  librariesDomain.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;
  librariesDomain.ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
  librariesDomain.PrivateBinPath = @"Libraries";
  AppDomain appDomain = AppDomain.CreateDomain("LibrariesDomain", null, librariesDomain);

in Program.Main() and MyService.OnStart().

Neither work.

I tried using fuslogvw to log ALL binds but that only has an entries for MyService.exe, System, System.ServiceProcess and mscorlib.

Please, please, please someone shed some light on this nonsense. How do I reference a stupid DLL?

Also, tried copying the DLLs into c:\MyService and it still couldn't find them