Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

356
Views
Build .NET Core 3.0 on Azure Pipelines

Yes, I know .NET Core 3.0 is still in preview. I would like to build this on Azure Pipelines.

Is there an easy way to do this?

Currently getting this error:

/usr/share/dotnet/sdk/2.2.105/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.

edit

I found official documentation about this:

https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/dotnet-core?view=azure-devops

over 4 years ago · Santiago Trujillo
7 answers
Answer question

0

You can add task Use .NET Core and insert needed version in Version field like this 3.0.100-preview9-014004, mark Include Preview Versions as checked.

Execute this task before any other .NET Core tasks.

over 4 years ago · Santiago Trujillo Report

0

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

over 4 years ago · Santiago Trujillo Report

0

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

over 4 years ago · Santiago Trujillo Report

0

You can specify .net core SDK version with the .NET Core Tool Installer Task. But I dont think it allows 3.0 yet apparently it does, so you probably need to create a container with 3.0 and use that as a build environment. That would work.

https://docs.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops&tabs=yaml

sample yaml:

resources:
  containers:
  - container: inflation
    image: yyy
    endpoint: xxx

jobs:
- job: inflate_infrastructure
  container: inflation << has to match the container name above
  pool:
    vmImage: 'Ubuntu-16.04'
  steps:
  - zzz

over 4 years ago · Santiago Trujillo Report

0

I use .net core 2.2 but, it released .net core 3.0 preview 6 yesterday. you can use config below. I suggest inspecting release-metadata serves.

steps:
- task: UseDotNet@2
  displayName: 'Use .NET Core sdk'
  inputs:
    packageType: sdk
    version: 3.0.0-preview5
    installationPath: $(Agent.ToolsDirectory)/dotnet
over 4 years ago · Santiago Trujillo Report

0

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

over 4 years ago · Santiago Trujillo Report

0

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:

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!