【问题标题】:nuget.build.tasks.pack - build error author is requirednuget.build.tasks.pack - 需要构建错误作者
【发布时间】:2020-06-09 05:41:56
【问题描述】:

由于this question,我尝试将我的 Azure Devops 构建过程更改为使用 DotNet 而不是 Nuget

任务现在

- task: DotNetCoreCLI@2
  inputs:
    command: pack
    packagesToPack: '**/SBD.*.csproj'
    versioningScheme: byPrereleaseNumber
    majorVersion: '$(Major)'
    minorVersion: '$(Minor)'
    patchVersion: '$(Patch)

错误是

error MSB4057: The target "pack" does not exist in the project

我找到了this question,但它不适用于 DevOps

答案提到我需要从 Nuget 安装 Nuget.Build.Tasks Pack 包

所以我就这么做了

现在登录 devops 状态

C:\Users\VssAdministrator\.nuget\packages\nuget.build.tasks.pack\5.6.0\build\NuGet.Build.Tasks.Pack.targets(198,5): 
error : Authors is required. [D:\a\1\s\Common.WinForms\SBD.Common.WinForms.csproj]

【问题讨论】:

    标签: azure-devops dotnet-core-pack


    【解决方案1】:

    失败的项目是 net472。我不应该使用 DotNetCoreCli 来打包它

    【讨论】:

    • 感谢您在这里分享您的解决方案,您能接受您的解决方案作为答案吗?因此,对于遇到相同问题的其他成员轻松找到解决方案将很有帮助。祝你有美好的一天:)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-07-03
    • 1970-01-01
    • 2021-04-12
    • 1970-01-01
    • 2020-03-28
    • 2019-02-10
    • 2016-02-22
    相关资源
    最近更新 更多