I've been using NLog for about 8 months and I absolutely love it! I maintain a dozen or so REST APIs that I manage with Visual Studio. Whenever I run the application from VS, Swagger opens up in my browser and the logs pop up in a console window and I can watch the logs display in real time as I test and debug. It has always worked perfectly, but since upgrading to VS2022, the console window no longer opens, so I can't see the logs. Is there a config value in NLOG or an environment setting in Visual Studio I need to change?
Here is my config file if it helps.
<?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"
autoReload="true"
internalLogLevel="Info"
internalLogFile="">
<!-- enable asp.net core layout renderers -->
<extensions>
<add assembly="NLog.Web.AspNetCore"/>
</extensions>
<!-- the targets to write to -->
<targets>
<target xsi:type="Console" name="ConsoleLog" detectConsoleAvailable="false"
layout="${longdate}|${level:uppercase=true}|${logger}|${message} ${exception:format=tostring}" />
</targets>
<!-- rules to map from logger name to target -->
<rules>
<logger name="*" minlevel="Trace" writeTo="ConsoleLog" />
</rules>
</nlog>
Any ideas?