我已经使用.NET Core Installer任务创建了一个测试管道,如下所示:
今天(2019-11-22)运行任务,它将安装v2.2.402
:
##[section]Starting: Use .Net Core sdk 2.2.x
==============================================================================
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.0.24
Author : Microsoft Corporation
Help : https://aka.ms/AA4xgy0
==============================================================================
Tool to install: .NET Core sdk version 2.2.x.
Found version 2.2.402 in channel 2.2 for user specified version spec: 2.2.x
Version: 2.2.402 was found in cache.
Creating global tool path and pre-pending to PATH.
##[section]Finishing: Use .Net Core sdk 2.2.x
根据Download .NET Core 2.2页,SDK 2.2.402
,2.2.206
和2.2.109
(运行时v2.2.7
)已于 2019年9月10日发布:
但是SDK 2.2.207
和2.2.110
(运行时v2.2.8
)已于 2019年11月19日发布:
因此,根据.NET Core Installer task的文档,可用以下格式给出版本:
2.x
=>安装最新的主要版本。2.2.x
=>安装最新的主要版本和次要版本2.2.104
=>安装确切版本为什么安装了v2.2.402
?使用2.2.x
或2.1.x
之类的通配符时,用于选择要安装的SDK版本的标准是什么?
答案 0 :(得分:1)
使用semantic versioning 2.0选择“使用.Net Core任务”或“ .Net Core安装程序”任务中的版本。
因此,将选择最高版本号,在2.2.207和2.2.402的情况下为2.2.402
答案 1 :(得分:0)
为什么安装了v2.2.402?使用通配符(例如2.2.x或2.1.x)时,选择要安装的SDK版本的标准是什么?
很抱歉收到这个较晚的答复,但仍然希望它能为您提供帮助
这是Github上的一个已知问题:
.NET Core November Update - 2.1.14, 2.2.8, and 3.0.1
IanKemp评论:
2.2.7包含用于VS 2019 v16.2的SDK 2.2.402,但是此版本没有仅适用于16.0的16.2 SDK。。这是否意味着SDK 2.2.402是最新的 并且,如果我们已经拥有它,则不需要2.2.8的SDK 2.2.207
比较发行说明v2.2.8
和v2.2.7
:
因此,最新的SDK版本不支持最新的Visual Studio版本,这可能就是我们仍然通过该任务获得v2.2.402
版本的原因。
支持16.2
的版本应尽快发布。届时,我们可以使用此任务获取版本2.2.207
。
希望这会有所帮助。