作为持续集成的一部分,我构建了一个解决方案,其中包含将类库推送到我的 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 库中,这也很奇怪。