Of course, you can put the configuration in the app.config file.
You just need to use NLog.Config.ConfigSectionHandler , so you need to write
<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/> </configSections> <nlog> <targets>...</targets> <rules>...</rules> </nlog> </configuration>
as described in the NLog documentation in the section Configuration File Format .
source share