azure-pipelines-tasks: Use .Net Core task V0 does not work anymore

Required Information

Type: Bug

Enter Task Name: DotNetCoreInstallerV0 / Use .Net Core task (V0)

Environment

Azure DevOps Server (On-Premise) Version: 17.143.28912.1

Issue Description

The task does not work since a few weeks. I understand that the task is deprecated (announcement) but because this task is embeded in Azure DevOps Server itselft - it’s not updable with the Marketplace. So, on-premise environment is impacted by this.

Note 1: I have not the last version of Azure DevOps Server, but on-premise environments have some constraints and often not up-to-date.

Note 2: I know I can install manually the .NET Core SDKs on build agents, but it’s a regression for users and not optimal to manage.

Requested: If you can not fix (make available again the releases.json file with updated information), can you provide a method to update the task on Azure DevOps Server without need to do a full update? Release theses tasks on the Marketplace would be nice 😉

Task logs

============================================================================== Task : .NET Core SDK Installer Version : 0.2.0 Author : Microsoft Corporation ============================================================================== Tool to install: .NET Core sdk version 3.1.101. [command]C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "& 'E:\TFSAgents\Build-SVB1171-01\_work\_tasks\DotNetCoreInstaller_b0ce7256-7898-45d3-9cb5-176b752bfea6\0.2.0\externals\get-os-platform.ps1'" Primary:win-x64 Detected platform (Primary): win-x64 Checking if a cached copy exists for this version... The cache does not contain the requested version of .NET Core. Downloading and installing it now. Getting URL to download .NET Core sdk version: 3.1.101. ##[error]Unexpected token : in JSON at position 3

Troubleshooting

In the version 0.2.0 of the task, in releasesfetcher.js:

const DotNetCoreReleasesUrl = "https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json";

This file is no more available.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

@jochenjonc After installing the UseDotNet@2 task, you need to modify your build definition to either use this task or use version 2 of the task if you have modified the task.json as done by @ChristopheLav. Other than that copying the agent directory content is not needed. When the build definition runs on any agent, the task will be downloaded from the on-prem server to the agent and it will run.

Excellent. I have test on a lab to change the guid/name, and the new version was added successfully. So the issue is now closed for me. Thank you so much for your quick assistance! I appreciate.

image

Hey @ChristopheLav , PFA updated dotnetcore installer task. UseDotNetV2.zip

Instructions for installing it.

  1. Install tfx-cli npm tool using npm install -g tfx-cli
  2. run tfx login on cli For Service URL: Pass your <on-prem url>/DefaultCollection Personal access token: Pass your PAT token. For any troubleshooting, you can use this doc on failure of service url, you can try passing: <on-prem url>/tfs/DefaultCollection
  3. After successful login, unzip the above package to some directory PATH_TO_DIR
  4. run tfx build tasks upload --task-path PATH_TO_DIR

The new task will be available on your on-premise server with the name .Net Core Installer (with fix). Let me know if you have any issues.