【问题标题】:VSTS Release Task - Push to NugetVSTS 发布任务 - 推送到 Nuget
【发布时间】:2017-11-15 03:32:14
【问题描述】:

我正在尝试为我的核心项目和包装器设置 CI 到我们的 vsts nuget 提要。 我遵循了包管理之禅教程here
这有点过时了,但我相信我设法翻译了这些更改。

我的构建似乎工作正常,它构建 dll's 并将其打包成几个 nuget 包。

该版本似乎也可以工作,但Nuget Feed 没有更新最新的软件包。

我的发布任务只是一个任务,如下图所示。 日志显示找到并下载了包,但实际推送到nuget并没有显示任何成功。

这是显示包被找到并成功完成的日志。

2017-11-15T02:40:59.5675003Z ##[section]Finishing: Initialize Job
2017-11-15T02:40:59.6125167Z ##[section]Starting: Download Artifacts
2017-11-15T02:41:00.2861639Z Downloading artifact
2017-11-15T02:41:00.2961643Z Creating artifacts directory: d:\a\r1\a
...etc

2017-11-15T02:41:00.8313684Z Downloading file d:\a\r1\a\Satalyst-Visual Studio-CI\drop\release\Packaged\Satalyst.AzureWrapper.Domain.2.0.0.3.nupkg
2017-11-15T02:41:00.9943663Z Downloading file d:\a\r1\a\Satalyst-Visual Studio-CI\drop\release\Packaged\Satalyst.PaymentGateway.Interfaces.2.0.0.3.nupkg
2017-11-15T02:41:00.9998063Z Downloading file d:\a\r1\a\Satalyst-Visual Studio-CI\drop\release\Packaged\Satalyst.PaymentGateway.Test.2.0.0.3.nupkg
...etc

2017-11-15T02:41:01.0750176Z Download complete.
2017-11-15T02:41:01.0761342Z 16 placed file(s): 16 downloaded, 0 empty
2017-11-15T02:41:01.0830178Z 1 MB downloaded at 1491 KB/sec. Download time: 00:00:00.2761869.
2017-11-15T02:41:01.0830178Z Downloaded linked artifact Satalyst-Visual Studio-CI
2017-11-15T02:41:01.0830178Z Finished artifacts download
2017-11-15T02:41:01.0890187Z ##[section]Finishing: Download Artifacts

...它下面的这一点成功了,但是提要没有显示新的包??

2017-11-15T02:41:01.0920188Z ##[section]Starting: NuGet Publish
2017-11-15T02:41:01.1190170Z ==============================================================================
2017-11-15T02:41:01.1190170Z Task         : NuGet
2017-11-15T02:41:01.1190170Z Description  : Restore, pack, or push NuGet packages, or run a NuGet command. Supports NuGet.org and authenticated feeds like Package Management and MyGet. Uses NuGet.exe and works with .NET Framework apps. For .NET Core and .NET Standard apps, use the .NET Core task.
2017-11-15T02:41:01.1190170Z Version      : 2.0.15
2017-11-15T02:41:01.1190170Z Author       : Microsoft Corporation
2017-11-15T02:41:01.1190170Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613747)
2017-11-15T02:41:01.1190170Z ==============================================================================
2017-11-15T02:41:04.1372760Z Caching tool: NuGet 4.1.0 x64
2017-11-15T02:41:04.1502760Z Found tool in cache: NuGet 4.1.0 x64
2017-11-15T02:41:04.1612765Z Resolved from tool cache: 4.1.0
2017-11-15T02:41:04.1612765Z Using version: 4.1.0
2017-11-15T02:41:04.1612765Z Found tool in cache: NuGet 4.1.0 x64
2017-11-15T02:41:05.1667858Z [command]C:\Windows\system32\chcp.com 65001
2017-11-15T02:41:05.1667858Z Active code page: 65001
2017-11-15T02:41:05.1877908Z ##[section]Finishing: NuGet Publish
2017-11-15T02:41:05.1937859Z ##[section]Finishing: Release

任何帮助将不胜感激,我一直在做一些试验和错误以找到没有成功的问题。我现在有点卡住了,没有错误消息,也没有关于推送结果的反馈。

【问题讨论】:

  • 将 system.debug 变量添加到发布定义并设置为 true,然后开始发布并在此处发布日志。

标签: nuget azure-devops


【解决方案1】:

这是由发布定义中 NuGet Push 任务的 Path to NuGet package(s) to publish 选项配置引起的。

请更改 NuGet 包的路径以发布为:

$(System.DefaultWorkingDirectory)/**/packed/*.nupkg

然后应该将 nuget 包正确发布到您的提要。

【讨论】:

  • 优秀的答案。此外,我建议使用它来排除软件包符号版本的发布:$(System.DefaultWorkingDirectory)/**/*.nupkg;!$(System.DefaultWorkingDirectory)/**/*.symbols.nupkg
猜你喜欢
  • 1970-01-01
  • 2018-06-12
  • 2016-12-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多