Hello
I'm quite new to NLog and have now the following issue. I tried to find something about it in the forums, but failed. So here is my problem:
My project consist of multiple applications (C#) which are dependend from each other. For debugging purpose I have a folder "d:\develop\" which is my working direcotry (set in the project settings for each application). Inside the "develop" folder there is vital content (about 1GB) for the applications, so that I can not move this to the compile target folder ".\bin\debug\". It's also not possible to set the output path to "d:\develop\" due to some internal reasons (ILMerge, ecryption, postprocessing, ...).
As I know from the tutorials the config-file of NLog will be searched at several locations. One of these locations is the application directory. During debugging the application directory is ".\bin\debug\" (the output directory) and not the working direcotry "d:\develop\".
A long way to come this point, know the short question:
"Is there a way to make NLog load the file from the working directory (d:\develop\processname.nlog)?"
The only solution I have right now, is to manually tell NLog to load from a specific file:
NLog.LogManager.Configuration = new NLog.Config.XmlLoggingConfiguration(configFilename, true);
But this is not the way I'm looking for. I don't want to analyse my process to get the name (to construct the "process.nlog" filename) and the working directory (which wouldn't be to hard - I know). I just want to know if there is already a possibility to achieve this, as the use of a "d:\develop" folder is very common in our company.
Thanks to your help in advance!