Open
Description
Description
According the documentation https://github.com/actions/runner-images/blob/win22/20250617.1/images/windows/Windows2022-Readme.md the image has the .NET tools for .NET 8.0.314 cached. Yet the UseDotNet
task (with global.json) still needs to install this sdk because it can't find it.
Platforms affected
- Azure DevOps
- GitHub Actions - Standard Runners
- GitHub Actions - Larger Runners
Runner images affected
- Ubuntu 22.04
- Ubuntu 24.04
- macOS 13
- macOS 13 Arm64
- macOS 14
- macOS 14 Arm64
- macOS 15
- macOS 15 Arm64
- Windows Server 2019
- Windows Server 2022
- Windows Server 2025
Image version and build link
Starting: Initialize job
Agent name: 'Azure Pipelines 2'
Agent machine name: 'fv-az619-267'
Current agent version: '4.258.1'
Operating System
Microsoft Windows Server 2022
10.0.20348
Datacenter
Runner Image
Image: windows-2022
Version: 20250623.1.0
Included Software: https://github.com/actions/runner-images/blob/win22/20250623.1/images/windows/Windows2022-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20250623.1
Runner Image Provisioner
2.0.437.1
Current image version: '20250623.1.0'
Is it regression?
no
Expected behavior
The SDK version in found in the cache and doesn't need to be downloaded and installed.
Actual behavior
The SDK is being downloaded and installed.
Starting: Use dotnet (global.json)
==============================================================================
Task : Use .NET Core
Description : Acquires a specific version of the .NET Core SDK from the internet or the local cache and adds it to the PATH. Use this task to change the version of .NET Core used in subsequent tasks. Additionally provides proxy support.
Version : 2.259.0
Author : Microsoft Corporation
Help : https://aka.ms/AA4xgy0
==============================================================================
Found version 8.0.314 in channel 8.0 for user specified version spec: 8.0.314
Getting URL to download .NET Core sdk version: 8.0.314.
Detecting OS platform to find correct download package for the OS.
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "& 'D:\a\_tasks\UseDotNet_b0ce7256-7898-45d3-9cb5-176b752bfea6\2.259.0\externals\get-os-platform.ps1'"
Primary:win-x64
Detected platform (Primary): win-x64
Version 8.0.314 was not found in cache.
Downloading: https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.314/dotnet-sdk-8.0.314-win-x64.zip
Extracting downloaded package D:\a\_temp\8e619b65-e83c-4f5d-8d3a-c035d74935ec.
Extracting archive
C:\Windows\system32\chcp.com 65001
Active code page: 65001
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a\_temp\8e619b65-e83c-4f5d-8d3a-c035d74935ec', 'D:\a\_temp\a581')"
Successfully installed .NET Core sdk version 8.0.314.
Creating global tool path and pre-pending to PATH.
Finishing: Use dotnet (global.json)
Repro steps
Make sure the following global.json is available in the root of the repository:
{
"sdk": {
"version": "8.0.314",
"rollForward": "latestPatch"
}
}
Use following pipeline to run and see the result:
pool:
vmImage: windows-2022
steps:
- task: UseDotNet@2
displayName: Use dotnet (global.json)
inputs:
packageType: sdk
useGlobalJson: true
performMultiLevelLookup: true