1
votes

Having trouble publishing a NuGet package from a yaml pipeline, restore/build/pack all works ok it's just the pushing that is failing and it seems to be related to the Push generating a bad url for the Artefact feed that I am pushing the package to.

I've been able to push the package from a NuGet command locally and connect to the Artefact feed, the "d____i" is an organization scoped feed and the library is in that feed as you can see, the url seems incorrect to what I get when I go to the "Connect to feed" from the DevOps page, which looks like this below

<add key="d_____i" value="https://pkgs.dev.azure.com/d_____i/_packaging/d_____i/nuget/v3/index.json" />

Push failture yaml pipeline settings for push

1
Could you try to use packagesToPush and provide path where your packages are?Krzysztof Madej
I'll have a look at that and give it atryMichael Pine

1 Answers

0
votes

It appears to me your publishVstsFeed isn't set correctly. You would expect to see a GUID of the feed or name (I think in your case, d_____i) here and the path to the package in the packagesToPush property.

This is documented in the task documentation for NuGetCommand@2.

Example:

- task: NuGetCommand@2
  inputs:
    command: 'push'
    nuGetFeedType: 'internal'
    publishVstsFeed: '99303781-4bbb-41d6-a13e-fe40603b9cb7'
    packagesToPush: 'packages/*.nupkg'
    allowPackageConflicts: true