Type: bug
Enter Task Name: UseDotNet
Attempting to request the latest patch version of SDK 2.2 by specifying version as '2.2.x' fails with the error:
SDK version matching: 2.2.x could not be found
Attempting to specify SDK version as '2.2' fails with the error:
Version 2.2 is not allowed. Allowed version types are: majorVersion.x, majorVersion.minorVersion.x, majorVersion.minorVersion.patchVersion
stages:
- stage: build
displayName: 'Build'
jobs:
- job: install_tools
displayName: Install Required Tools
pool:
vmImage: 'windows-2019'
steps:
- task: UseDotNet@2
displayName: Install .NET Core SDK
inputs:
packageType: SDK
version: '2.2.x'
2019-07-17T07:45:28.8749288Z ##[section]Starting: Install .NET Core SDK
2019-07-17T07:45:28.8867959Z ==============================================================================
2019-07-17T07:45:28.8868008Z Task : Use dotnet
2019-07-17T07:45:28.8868038Z 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.
2019-07-17T07:45:28.8868089Z Version : 2.0.10
2019-07-17T07:45:28.8868119Z Author : Microsoft Corporation
2019-07-17T07:45:28.8868151Z Help : https://aka.ms/AA4xgy0
2019-07-17T07:45:28.8868198Z ==============================================================================
2019-07-17T07:45:29.3531304Z Tool to install: .NET Core SDK version 2.2.x.
2019-07-17T07:45:31.2319108Z No matching SDK version could be found for specified version: 2.2.x Kindly note the preview versions are only considered in latest version searches if Include Preview Versions checkbox is checked.
2019-07-17T07:45:31.2466123Z ##[error]SDK version matching: 2.2.x could not be found
2019-07-17T07:45:31.2608182Z ##[section]Finishing: Install .NET Core SDK
Edit: Correctly quote YAML as code.
Turns out that 'packageType:' is case sensitive. SDK fails, sdk works.
I still consider this a defect.
@TheRealEdwardCullen thanks for reporting the issue and the root cause for it. We feel the same and have raised a PR to fix that.
The fix has been checked in and will roll-out as part of sprint 156. Deployment will start after 3 weeks.