Blockquote
Adding the following code in my .csproj file resolved the issue:
I'd appreciate it if someone could explain what was wrong and how this fix resolved the issue.
Thank you aim, this also fixed it for me on my .NET 8 app.