Black Asphalt Road Surrounded by Green Grass

Using .net core 3.0 in Azure DevOps

| 0 Comments | words | minutes | Permalink

During todays livestreamed ".net conf 2019", Microsoft announced that .net core 3.0 has been released.

The release includes a plethora of changes and improvements, however one thing that is yet to be completed is official Azure DevOps pipeline images containing the 3.0 SDK.

For Kenc.ACMELib I updated my Azure DevOps pipeline today to build using .net core 3.0. These are the steps involved.

Edit pipeline

  1. Navigate to pipelines in the menu
  2. Click the pipeline you wish to edit
  3. Add a new task for "Use .net" Screenshot of add task window, showing new "use .net" task
  4. Set version to 3.0.x Properties screenshot setting version to 3.0.x
  5. Re-arrange the tasklist to include the installation before any task that uses .net core 3.0

note: After installing .net core 3.0, I had to repeat the steps to install the other versions I use in the pipeline! (2.0.x, 2.1.x)

If using YAML:

- task: UseDotNet@2
  displayName: 'Use .Net Core sdk 3.0.x'
    version: 3.0.x

Trigger new build to test the pipeline

With version 3.0 installed, the build completes

2019-09-23T20:44:17.0660135Z Welcome to .NET Core 3.0!
2019-09-23T20:44:17.0660620Z ---------------------
2019-09-23T20:44:17.0660873Z SDK Version: 3.0.100
2019-09-23T20:44:17.0661079Z Telemetry
2019-09-23T20:44:17.0661203Z ---------
2019-09-23T20:44:17.0661353Z The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
2019-09-23T20:44:17.0661638Z Read more about .NET Core CLI Tools telemetry:
2019-09-23T20:44:17.0661825Z ----------------
2019-09-23T20:44:17.0661935Z Explore documentation:
2019-09-23T20:44:17.0662074Z Report issues and find source on GitHub:
2019-09-23T20:44:17.0662374Z Find out what's new:
2019-09-23T20:44:17.0662857Z Learn about the installed HTTPS developer cert:
2019-09-23T20:44:17.0663088Z Use 'dotnet --help' to see available commands or visit:
2019-09-23T20:44:17.0663234Z Write your first app:
2019-09-23T20:44:17.0663390Z --------------------------------------------------------------------------------------
2019-09-23T20:44:18.0700314Z Microsoft (R) Build Engine version 16.3.0+0f4c62fea for .NET Core
2019-09-23T20:44:18.0714916Z Copyright (C) Microsoft Corporation. All rights reserved.
2019-09-23T20:44:23.5001921Z   Restore completed in 1.11 sec for d:\a\1\s\src\Examples\ACMEClient\ACMEClient.csproj.
2019-09-23T20:44:41.6266615Z   Restore completed in 17.65 sec for d:\a\1\s\src\Libraries\ACMELib\Kenc.ACMELib.csproj.
2019-09-23T20:45:25.9142959Z   Restore completed in 1.05 min for d:\a\1\s\src\Libraries\ACMELib.Tests\Kenc.ACMELibCore.Tests.csproj.
2019-09-23T20:45:28.1556166Z   Kenc.ACMELib -> d:\a\1\s\Drops\Release\AnyCPU\Kenc.ACMELib\netcoreapp2.1\Kenc.ACMELib.dll
2019-09-23T20:45:28.1663148Z   Kenc.ACMELib -> d:\a\1\s\Drops\Release\AnyCPU\Kenc.ACMELib\netcoreapp2.0\Kenc.ACMELib.dll
2019-09-23T20:45:28.8004663Z   Kenc.ACMELib -> d:\a\1\s\Drops\Release\AnyCPU\Kenc.ACMELib\netcoreapp3.0\Kenc.ACMELib.dll
2019-09-23T20:45:28.8707703Z   Kenc.ACMELibCore.Tests -> d:\a\1\s\Drops\Release\AnyCPU\Kenc.ACMELibCore.Tests\netcoreapp2.0\Kenc.ACMELibCore.Tests.dll
2019-09-23T20:45:29.1176799Z   ACMEClient -> d:\a\1\s\Drops\Release\AnyCPU\ACMEClient\netcoreapp3.0\ACMEClient.dll
2019-09-23T20:45:29.3815502Z   Kenc.ACMELibCore.Tests -> d:\a\1\s\Drops\Release\AnyCPU\Kenc.ACMELibCore.Tests\netcoreapp3.0\Kenc.ACMELibCore.Tests.dll
2019-09-23T20:45:29.6942556Z   Kenc.ACMELibCore.Tests -> d:\a\1\s\Drops\Release\AnyCPU\Kenc.ACMELibCore.Tests\netcoreapp2.1\Kenc.ACMELibCore.Tests.dll
2019-09-23T20:45:30.0586837Z   Successfully created package 'd:\a\1\s\Drops\Release\AnyCPU\Kenc.ACMELib\Kenc.ACMELib.2019.9.23.6.nupkg'.

Screenshot of successful build

Final pipeline

Screenshot of final pipeline showing 'use .net core' tasks for versions 2.0.x, 2.1.x and 3.0.x


Add comment