In my project I got an NLog.config file but when I debug the Main method on my project NLog.LogManager.Configuration is null.
How can I make sure that the NLog.config will be found?
In my case, I have just changed NLog.config property "Copy to output directory" = "Copy if newer"
from "Do not copy".
When there is no config loaded, NLog.LogManager.Configuration will return null.
There could be various reasons why the config is not loaded, check the troubleshooting steps for finding the reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With