Note to self...
Found this out the hard way when I couldn't figure out why my log4net
configuration wasn't loading properly.
When starting a top shelf application as a service, the current
directory is the system directory (C:\Windows\system32) instead of the
actual application directory.
So if your code is expecting to be running from a particular location,
it may have issues.
A normal suggestion is to have the following statement in the startup
logic for the service
System.IO.Directory.SetCurrentDirectory
(System.AppDomain.CurrentDomain.BaseDirectory);
(from
http://haacked.com/archive/2004/06/29/706.aspx )
James