Webサイトプロジェクトを使用しており、NugetからNlogを追加し、次のNLog構成を使用しました。
<?xml version="1.0" encoding="utf-8" ?>
<nlog autoReload="true"
throwExceptions="true"
xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="logfile" xsi:type="File" fileName="log.txt" />
</targets>
<rules>
<logger name="*" minlevel="Info" writeTo="logfile" />
</rules>
</nlog>
ProcessMonitorを実行しましたが、NlogがWebサイトのプロジェクトフォルダーではなくIISExpressフォルダーにlog.txtを作成しようとしていることが示されています。
C:\ Program Files(x86)\ IIS Express \ log.txt
NLogにログファイルをlog.txt
IISExpressフォルダーではなくWebサイトプロジェクトのフォルダーに配置させるにはどうすればよいですか?