Why can't nlog read the current date
问题 I'm using Nlog to write some logging to a textfile. Partial nlog.config: <target name="file" xsi:type="File" fileName="${basedir}/MBWRunner_log.txt" layout="${date} (${level}): ${message} Exception: ${exception:format=Method, ToString}"/> Lines in the logfile look like this: 0001-01-01 00:00:00 (Trace): MBWRunner started As you can see the date and time are all 0. I have tested {longdate} and {date:format=yyyyMMddHHmmss} with the same result. The application is a console app, run from an