NLog file logging from Visual Studio but not when I build and install the application

南楼画角 提交于 2020-01-15 18:51:55

问题


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" ...

来源:https://stackoverflow.com/questions/32723805/nlog-file-logging-from-visual-studio-but-not-when-i-build-and-install-the-applic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!