Question: I created a pipeline but when the process failed all the time on "Nuget Restore", see error message below.

I don't understand why

Thanks for your help

[![enter image description here](https://i.stack.imgur.com/DeS04.png)](https://i.stack.imgur.com/DeS04.png)

```
*The nuget command failed with exit code(1) and error(C:\Program Files\dotnet\sdk\2.2.110\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.0. Either target .NET Core 2.2 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. [D:\a\1\s\PackSecurity\PackSecurity.csproj] C:\Program Files\dotnet\sdk\2.2.110\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.0. Either target .NET Core 2.2 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. [D:\a\1\s\PackSecurity.Tests\PackSecurity.Tests.csproj])
Packages failed to restore*

```

Answer: 
Use "windows-2019" as the agent. Click on "Agent job 1" and set "Agent Specification" as "windows-2019".

Let me know if it worked for you.

[![Agent specification -> windows-2019](https://i.stack.imgur.com/qPW9e.png)](https://i.stack.imgur.com/qPW9e.png)
According to the error message:

> 
> The current .NET SDK does not support targeting .NET Core 3.0. Either
>  target .NET Core 2.2 or lower, or use a version of the .NET SDK that
>  supports .NET Core 3.0.
> 
> 
> 

We could to know that you have one or more projects target to the `.NET Core 3.0`, but the agent you select does not have that version .NET Core installed by default. It should has version `2.2.11` installed.

To resolve this issue, we could add a Use [.NET Core task](https://learn.microsoft.com/en-gb/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops) to install the `.net core 3.0.x`:

[![enter image description here](https://i.stack.imgur.com/CsO9W.png)](https://i.stack.imgur.com/CsO9W.png)

Check the [similar ticket](https://stackoverflow.com/questions/59241957/net-core-3-1-not-yet-supported-in-azure-pipelines-hosted-agents-getting-netsdk) for some more details.

Hope this helps.