May 19, 2010 at 3:28 AM
Edited May 19, 2010 at 3:58 AM
I haven't personally tried using the TARGETDIR property in the setup project if it is feasible to use it to define to where your log file will be logged.
Though, other options that you may want to consider are
1. Use environment variable.
2. Modify the config file during runtime where you can define where exactly you would want to create your log file before your actual logging happens.
Sample for this would be
Configuration xmlConfiguration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
LoggingSettings setting = (LoggingSettings)xmlConfiguration.GetSection(LoggingSettings.SectionName);
FlatFileTraceListenerData flatFile = setting.TraceListeners.Get("Flat File Trace Listener")
Hope these options may help.
Global Technology and Solutions