3

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

在第二次构建之前,我将包升级为@release,如果这有什么不同?

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

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\1\Nuget\tempNuGet_150.config 2017-07-24T10:48:52.1549071Z [command]d:\a\_tasks\NuGetCommand_333b11bd-d341-40d9-afcf-b32d5ce6f23b\2.0.5\VstsNuGetPush\0.13.0\VstsNuGetPush.exe d:\a\1\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 Pack 选项是使用基于date & time.

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

4

2 回答 2

1

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

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

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

于 2017-07-25T12:54:55.120 回答
0

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

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

    在此处输入图像描述

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

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

    在此处输入图像描述

于 2017-07-25T06:06:38.793 回答