question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet nuget push "SkipDuplicate" option for org feed

See original GitHub issue

Required Information

Type: Feature Enter Task Name: DotNetCoreCLI

Issue Description

When using the DotNetCoreCLI task, command “nuget push”, it is not possible to specify “SkipDuplicates”. This option does seem to exist on the cli itself and in the Nuget task.

dotnetcorecli

nuget

In YAML terms:

steps:
- task: DotNetCoreCLI@2
  displayName: 'dotnet push'
  inputs:
    command: push
    packagesToPush: '$(System.DefaultWorkingDirectory)/_testpackage/drop/**/*.nupkg'
    publishVstsFeed: 'testfeedguid'

- task: NuGetCommand@2
  displayName: 'NuGet push'
  inputs:
    command: push
    publishVstsFeed: 'testfeedguid'
    allowPackageConflicts: true

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

19reactions
satbaicommented, May 20, 2020

I have discussed this with the team and we have decided not to add this functionality to the task. Instead of using these “bulkier” tasks we now recommend using the NuGet Authenticate task to authenticate to Azure DevOps Artifacts feeds and to use a script task with nuget/dotnet to use the parameters you need.

- task: NuGetAuthenticate@0
- task: UseDotNet@2 # Optional if the .NET Core SDK is already installed
- script: dotnet restore
# ...
- script: dotnet nuget push --api-key AzureArtifacts --skip-duplicate --source https://pkgs.dev.azure.com/{organization}/{project?}/_packaging/{feed1}/nuget/v3/index.json MyProject.*.nupkg 

The reason for this is that the NuGet/Dotnet clients are actively being developed and new parameters and functionality are being added often. To keep up with all of the updates causes a lot of extra support for these bulky tasks. Please use example above to set up your pipeline with the ‘–skip-duplicate’ parameter. Thank you for understanding.

16reactions
Styxxycommented, May 21, 2020

Thanks for the feedback. Seems this means we should abandon any tasks all together and go back to scripting…

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet nuget push command - .NET CLI - Microsoft Learn
Specifies the file path to the package to be pushed. Options. -d|--disable-buffering. Disables buffering when pushing to an HTTP(S) server to ...
Read more >
how do I use "nuget push" with the --skip-duplicate option in ...
Try to use custom: nuget and put the push in argument. Check the following syntax: steps: - task: DotNetCoreCLI@2 displayName: 'dotnet nuget ......
Read more >
`dotnet nuget push --skip-duplicate` does not work as expected
dotnet nuget push added the --skip-duplicate option: When pushing multiple packages to an HTTP(S) server, treats any 409 Conflict response ...
Read more >
Add a setting for allowing/disallowing duplicate NuGet ...
Please make sure that the dotnet cli command line option "--skip-duplicate" works, which means you should return the same error that nuget.org ......
Read more >
Option to "ignore" rather than "replace" existing packages on ...
Option to "ignore" rather than "replace" existing packages on Nuget Publish. Relates to 1. Relates to 1 issue (1 unresolved). N. TW-24694 Nuget...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found