I'm creating a Azure DevOps pipeline, and I have a requirement to use .NET Core 3.1.
From the documentation, I can't see any obvious reference to the version of .NET Core that will be used with the DotNetCoreCLI
task, so I gave it a try -
- task: DotNetCoreCLI@2
name: Dotnet_Restore
inputs:
command: 'restore'
feedsToUse: 'select'
This failed with the error The current .NET SDK does not support targeting .NET Core 3.1.
, but interestingly the logs state -
Info: Azure Pipelines hosted agents have been updated to contain .Net Core 3.x SDK/Runtime along with 2.2 & 2.1.
With this is mind, I again looked at the documentation and came across the requestedMajor|Minor|PatchVersion
parameters, so I updated my task -
- task: DotNetCoreCLI@2
name: Dotnet_Restore
inputs:
command: 'restore'
feedsToUse: 'select'
requestedMajorVersion: '3'
requestedMinorVersion: '1'
Sadly this also failed, with the same 'Info' statement as above.