Build .NET Core 3.0 on Azure Pipelines

You can get the latest .NET Core 3 SDK by supplying 3.x instead of a specific version. Also note includePreviewVersions: true, which is required to make this work.

- task: UseDotNet@2
  displayName: 'Use dotnet sdk 3.x'
  inputs:
    version: 3.x
    includePreviewVersions: true

And you'll end up with something like this:

enter image description here

Source: .NET Core Tool Installer task


In case someone is using Web GUI instead of yaml files. It's possible to set up Agent Specification with windows-2019 value.

enter image description here

Such steps as dotnet test will start using .Net Core 3.0:

enter image description here


You can install the .Net core SDK 3.0 during the pipeline with .Net Core SDK Installer task:

- task: UseDotNet@2
  displayName: 'Install .net core 3.0 (preview)'
  inputs:
    packageType: sdk
    version: '3.0.100-preview6-012264'
    installationPath: $(Agent.ToolsDirectory)/dotnet

I specified the last preview version of .net core sdk 3.0, you can put an earlier version, you can find here the versions list.

Another option is to specify 3.0.x and enable the preview versions:

version: 3.0.x
includePreviewVersions: true

Installation results:

enter image description here


You can also install the SDK via the "old" Pipeline editor. Add a new task and search for the ".NET Core SDK Installer." Then switch the version at the top to the latest preview version and it will offer you more options, like the "Include Preview Versions" check box. You'll still have to type in the version you want manually.

Screenshot of my task: