nuget - VSTS 发布任务 - 推送到 Nuget

标签 nuget azure-devops

我正在尝试为我的核心项目和包装器设置 CI 到我们的 vsts nuget喂养。
我遵循了 Zen of Package Management 教程 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

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

enter image description here

最佳答案

是由的配置引起的要发布的 NuGet 包的路径 发布定义中 NuGet 推送任务的选项。

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

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

enter image description here

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

关于nuget - VSTS 发布任务 - 推送到 Nuget,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47298894/

相关文章:

azure-devops - 如何使用 REST API 在发布定义中设置代理队列?

azure-devops - 如何从 CI/CD 管道监控 adf 管道

azure-devops - VSTS - 部署组发布不起作用 : Unable to deploy to the target as the target is offline

c# - 无法找到与 'Microsoft.Azure.WebJobs' 兼容的版本

.net - 使用 NuGet 恢复预发行包

c# - Nuget 库的多运行时目标

azure - 在 Azure DevOps 中运行 az cli 命令

Azure DevOps - 我的自定义版本计数器变量存储在哪里?

c# - 查看 NuGet 包依赖层次结构

visual-studio-2015 - 安装NuGet时Visual Studio挂起