Azure DevOps : NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.x

I'm getting error 1045 from NuGet in my Azure Devops Pipeline.

The issue was that my NuGet restore task was using an older version of the task.

Task set to v1.* which is the old version

Changing it to task version 2.* (the latest at the time of writing) and then Saving&Queing fixed the issue.