In my case it was a third library written in .NET Framework 8.0 with an NLog dependency and my app was defined as .NET Core 6. I just had to restart it as .NET Framework 8.0 and do nothing with NLog.