Rod
Rod

Reputation: 255

VSTS Release Task - Push to Nuget

I'm trying to set up CI for my Core projects and wrappers to our vsts nuget feed. I've followed the Zen of Package Management tutorial here.
It's a little out of date, but I believe I managed to translate the changes.

My Build seems to work fine, it builds and packages the dll's into several nuget packages.

The release seems to work also, but the Nuget Feed is not updated with the latest packages.

My Release task is only one task as shown in the image below. The log shows that it found and downloaded the packages, but it does not show any success on the actual push to nuget.

This is the log that shows the packages being found, and successful completion.

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

... its this bit below that succeeds, but the feed does not show the new packages??

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

Any assistance would be greatly appreciated, I've been doing a bit of trial and error to find the issue with no success. I'm now a bit stuck with no error messages and no feedback on the outcome for the push.

enter image description here

Upvotes: 4

Views: 850

Answers (1)

Marina Liu
Marina Liu

Reputation: 38096

It's caused by the configuration of Path to NuGet package(s) to publish option for NuGet Push task in your release definition.

Please change the Path to NuGet package(s) to publish as:

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

enter image description here

Then the nuget package should be published to your feed correctly.

Upvotes: 2

Related Questions