Azure DevOps Pipeline vs. .NET Core 3.1

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: