gpt4 book ai didi

AzureDevops 任务名称 NuGetCommand 不明确

转载 作者:行者123 更新时间:2023-12-03 00:22:53 26 4
gpt4 key购买 nike

尝试运行管道时出现以下错误

Job Job: Step  task reference is invalid. The task name NuGetCommand is ambiguous. 
Specify one of the following identifiers to resolve the ambiguity:
.NuGetCommand, .NuGetCommand

下面是我的 .Net Standard 库的 .yml 文件

trigger:
- main

pool:
vmImage: 'windows-latest'

variables:
solution: '**/MyLibrary.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/MyLibrary.sln'
feedsToUse: 'config'
nugetConfigPath: './nuget.config'

- task: VSBuild@1
inputs:
solution: '**\MyLibrary.sln'
vsVersion: '15.0'
restoreNugetPackages: true

它似乎在提示NugetCommand@2,当它内置时没有意义?

编辑还尝试使用 - 任务:333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 而不是 - 任务:NuGetCommand@2

最佳答案

可能已使用tfx构建任务上传直接将其插入帐户,运行tfx构建任务列表以找出已安装的任务,如果需要,请删除非- 官方使用 tfx 构建任务删除

C:\Users\jesse>npm install tfx-cli -g
C:\Users\jesse>tfx build tasks list
TFS Cross Platform Command Line Interface v0.8.3
Copyright Microsoft Corporation
> Service URL: https://dev.azure.com/jessehouwing-dev
> Personal access token:

您要保留的是:

id            : 333b11bd-d341-40d9-afcf-b32d5ce6f23b
name : NuGetCommand
friendly name : NuGet
visibility :
description : Restore, pack, or push NuGet packages, or run a NuGet command. Supports NuGet.org and authenticated feeds like Azure Artifacts and MyGet. Uses NuGet.exe and works with .NET Framework apps. For .NET Core and .NET Standard apps, use the .NET Core task.
version : 2.179.0

如果有一个具有不同的 guid,则删除:


C:\Users\jesse>tfx build tasks delete --task-id the-task-id-guid-to-delete

它也可能作为私有(private)共享自定义扩展的一部分被推送。市场将阻止具有相同 GUID 的任务,但它将允许通过扩展安装具有相同名称的任务。检查您安装的扩展程序,尤其是私有(private)共享的扩展程序。

关于AzureDevops 任务名称 NuGetCommand 不明确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65332360/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com