We have upgraded all projects to .Net core 2.2 from .net core 2.1 and before upgrade all projects were building successfully on azure devops pipeline but after upgrade to .net core 2.2, Nuget restore task failing with below error
018-12-17T22:20:06.8107786Z ##[error]The nuget command failed with exit code(1) and error(C:\Program Files\dotnet\sdk\2.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 2.2. Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.2.
I have updated .net core 2.2 references to all projects and we are not using nuget.exe from project.
What am I missing ?
Update 1
As per rick's reply, I added .net core task in pipeline but still failing