SolvedHome dotnet.exe nuget push command now supports -skipDuplicate like nuget.exe did.

Details about Problem

Related Issue: #1630

In the related issue, NuGet.exe push was given a new option, -SkipDuplicate. This option needs to be made available in DotNet.exe nuget push as --skip-duplicate.

NuGet product used: dotnet.exe

12 Answers

✔️Accepted Answer

To clarify my expectation: #1630 should have included the required changes to dotnet. Without that, the feature is of little use. No one really wants to go back to bootstrapping nuget.exe in build scripts. The expectation is to use always use dotnet.

Other Answers:

I've just tried the --skip-duplicate successfully with azure pipelines and dotnet core 3.1 preview

- task: NuGetAuthenticate@0
  displayName: 'Authenticate in NuGet feed'
- task: UseDotNet@2
  displayName: 'Use latest .NET Core sdk 3.x'
    packageType: sdk
    version: 3.x
    includePreviewVersions: true
    installationPath: $(Agent.ToolsDirectory)/dotnet
- script: dotnet nuget push $(PATH_PIPELINE_ARTIFACT_NAME)/**/*.nupkg --source $(NUGET_FEED) --api-key $(NUGET_API_KEY) --skip-duplicate
  displayName: 'Uploads nuGet packages'

Are you on linux?

I have to use quotes on linux, otherwise --skip-duplicate has no effect.
dotnet nuget push "src/**/src/bin/Release/*.nupkg"

However, on windows, it seems to work without quotes:
dotnet nuget push src/**/src/bin/Release/*.nupkg