I'm trying to use NLog in an F# console application, I've managed to get it working using a configuration section in App.config however I can't get it working using a stand-alone NLog.config file. My NLog.config file is in the app route, just under App.config and the contents are:
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" throwExceptions="true">
<targets>
<target name="stdFile" xsi:type="File" fileName="c:/temp/compliant.log"/>
<target name="display" xsi:type="OutputDebugString"/>
</targets>
<rules>
<logger name="compliant.mail.*" minlevel="Debug" writeTo="stdFile,display" />
</rules>
</nlog>
What am I doing wrong?
Also, intellisense isn't working for the xml even though I have included the xsd. :(
In your project, in the Properties for NLog.config, do you have NLog.config marked as "Copy Always"?
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