Yesterday I have updated the target of my personal projects to .NET Core 3.1 and immediately I had a problem with the continuous integration in DevOps: all my build failed with this error:
“error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.1.”
Well, the problem seems to be that .NET Core 3.1 is not directly supported in the “native” DevOps Pipeline and to make it work, you need to add an “UseDotNet” Task, to download the framework you need.
This is the fragment of my YML configuration file:
# ASP.NET Core (.NET Framework)
– task: UseDotNet@2
inputs:
packageType: ‘sdk’
version: ‘3.x’
includePreviewVersions: true