NLog file logging from Visual Studio but not when

2019-08-08 10:24发布

问题:

I am integrating Nlog on an existing desktop application, to write logs to a shared folder. When running the application from Visual Studio, it writes files fine, both log file and internalLog file for debugging. But when I make a build and install it on the same machine it no longer writes the files.

Edit:
Language c#, and build using NSIS to create installers. Nlog.config is in the root folder of the project, and configuration (partial)

<target name="file" xsi:type="File"
            fileName="file-location"
            archiveFileName="archive-location"
            enableFileDelete="false" ...