【发布时间】:2020-02-10 12:36:54
【问题描述】:
我正在创建 Azure DevOps 管道,并且需要使用 .NET Core 3.1。
在documentation 中,我看不到任何对将与DotNetCoreCLI 任务一起使用的.NET Core 版本的明显引用,所以我试了一下-
- task: DotNetCoreCLI@2
name: Dotnet_Restore
inputs:
command: 'restore'
feedsToUse: 'select'
这失败了,错误为The current .NET SDK does not support targeting .NET Core 3.1.,但有趣的是日志状态-
信息:Azure Pipelines 托管代理已更新为包含 .Net Core 3.x SDK/Runtime 以及 2.2 和 2.1。
考虑到这一点,我再次查看文档并遇到requestedMajor|Minor|PatchVersion 参数,因此我更新了我的任务-
- task: DotNetCoreCLI@2
name: Dotnet_Restore
inputs:
command: 'restore'
feedsToUse: 'select'
requestedMajorVersion: '3'
requestedMinorVersion: '1'
遗憾的是,这也失败了,使用与上面相同的“信息”语句。
【问题讨论】:
-
在这里找到了一个类似的问题 - stackoverflow.com/questions/56574113/…