VSTS CI NuGet 成功推送到私有提要但未显示任何内容

VSTS CI NuGet push to private feed success but doesn't show anything

我有一个解决方案构建作为持续集成的一部分,其中一个步骤是将 class 库推送到我的 VSTS 包提要。这是第一次 CI 构建 运行 并创建了包。第二次显示成功,但是新版本不存在,也没有任何新包的迹象。

在第二次构建之前,我将包提升为@release,这是否有影响?

CI NuGet 推送构建的输出如下:

2017-07-24T10:48:51.4888942Z ##[section]Starting: NuGet push 2017-07-24T10:48:51.4888942Z ============================================================================== 2017-07-24T10:48:51.4888942Z Task : NuGet 2017-07-24T10:48:51.4888942Z Description : Restore, pack, or push NuGet packages, or run a NuGet command. Supports NuGet.org and authenticated feeds like Package Management and MyGet. 2017-07-24T10:48:51.4888942Z Version : 2.0.5 2017-07-24T10:48:51.4888942Z Author : Microsoft Corporation 2017-07-24T10:48:51.4888942Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613747) 2017-07-24T10:48:51.4888942Z ============================================================================== 2017-07-24T10:48:51.9019022Z [command]C:\Windows\system32\chcp.com 65001 2017-07-24T10:48:51.9059034Z Active code page: 65001 2017-07-24T10:48:51.9219032Z SYSTEMVSSCONNECTION exists true 2017-07-24T10:48:51.9409032Z Detected NuGet version 4.0.0.2283 / 4.0.0 2017-07-24T10:48:52.1389068Z Saving NuGet.config to a temporary config file. 2017-07-24T10:48:52.1449080Z ##[warning]No package sources were found in the NuGet.config file at d:\a\Nuget\tempNuGet_150.config 2017-07-24T10:48:52.1549071Z [command]d:\a\_tasks\NuGetCommand_333b11bd-d341-40d9-afcf-b32d5ce6f23b.0.5\VstsNuGetPush[=11=].13.0\VstsNuGetPush.exe d:\a\a\WAGR2.DAL.1.0.0-CI-20170724-104834.nupkg -Source https://forgan.pkgs.visualstudio.com/_packaging/1b92b113-5d65-4b30-8749-9362924199b5/nuget/v3/index.json -AccessToken ******** -NonInteractive -Verbosity Detailed 2017-07-24T10:48:52.7149186Z Trying to authenticate with auth token. 2017-07-24T10:48:53.3099300Z Successfully authenticated. 2017-07-24T10:48:53.3189305Z Authentication and request took 00:00:01.0127956 2017-07-24T10:48:53.3589311Z Adding package WAGR2.DAL.1.0.0-CI-20170724-104834.nupkg to feed 1b92b113-5d65-4b30-8749-9362924199b5 on https://forgan.pkgs.visualstudio.com/. 2017-07-24T10:48:53.3589311Z Trying to add package to feed without uploading. 2017-07-24T10:48:53.3589311Z Adding package to feed. 2017-07-24T10:48:54.1399458Z The package content is not already on the service. 2017-07-24T10:48:54.1399458Z Uploading package content. 2017-07-24T10:48:56.0287785Z Done uploading package content. 2017-07-24T10:48:56.0287785Z Adding package to feed. 2017-07-24T10:48:57.3686297Z Successfully added package to feed. 2017-07-24T10:48:57.4256306Z ##[section]Finishing: NuGet push

更新

Nuget 包选项是使用基于 date & time 的自动包版本控制。

该包没有与其他包一起出现在 NuGet 库中,这也很奇怪。

您似乎已成功将包 WAGR2.DAL.1.0.0-CI-20170724-104834.nupkg 发布到您的 VSTS 提要。所以请按照以下步骤找到包:

  1. 在您的 VSTS 源中,将发布视图设置为全部。

  2. 找到包 WAGR2.DAL 并单击它。

  3. 如果您的软件包版本为WAGR2.DAL.1.0.0,它将被视为最新版本。您可以在下拉列表中找到版本 1.0.0-CI-20170724-104834

我不知道为什么会这样,但现在有效的是:

  • 从 Feed 中删除包
  • 使用内部版本号格式(在选项下)将 Nuget Pack 自动包版本控制从 date & time 更改为 build number'$(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)'
  • 在 NuGet Push 上,我还必须选中复选框 Allow duplicates to be skipped

包现在每次都会发布,并且还会出现在 NuGet 库中。