Our XL-Release pipeline has placeholders with strings destined for an NLog config. NLog configs have syntax that support interpolated values using the same syntax as XL-Release uses for variables: ${variablename}
. For example, in NLog ${basedir}
equates to the base directory and ${shortdate}
gives a current timestamp string.
Unfortunately, XL-Release does a variable lookup on these values, finds nothing and replaces the intended NLog config text with nothing.
Is there a way to escape the NLog values so that XL-Release leaves them alone? Perhaps a backslash?: \${variablename}
.
Fo example, our lookup dictionary has an entry like so:
"App": {
"ProgramName": {
"ArchiveFilename": "${basedir}/logs/archive/ProgramName-${shortdate}.log",
"Filename": "${basedir}/logs/ProgramName.log"
},
etc...
The template looks like this:
<targets>
<target name="logfile" xsi:type="File" fileName="{{ App.ProgramName.Filename }}"
And, instead of getting this:
<targets>
<target name="logfile" xsi:type="File" fileName="${basedir}/logs/ProgramName.log"
I get this (XL-Release having dropped ${basedir}
):
<targets>
<target name="logfile" xsi:type="File" fileName="/logs/ProgramName.log"
How can I escape ${basedir}
so XL-Release doesn't replace it?