NuGet Publisher fails with 409 due to publishing symbols packages twice
See original GitHub issueWhen using the NuGet Publisher task with a wildcard pattern of *__.nupkg, the step inevitably fails when symbols packages are present. For example, if I have these packages:
bin\my.1.0.nupkg
bin\my.1.0.symbols.nupkg
This task will find both files and try to publish them both. But nuget.exe push will automatically push the symbols package when you push bin\my.1.0.nupkg
so when this task then tries to push the symbols package itself, a 409 inevitably results.
I workaround this by using this search pattern instead of the default: **\*.nupkg;-:**\*.symbols.nupkg
but it would be nice if the task was smart enough to suppress symbol packages from being uploaded twice.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:5 (4 by maintainers)
Top Results From Across the Web
.NET Core Publish fails when using SourceLink or snupkg ...
Publishing to my repository then appears to fail because it complains the package already exists when adding the second old symbols format nupkg...
Read more >VSO Build - NuGet Publish 409 Conflict - Stack Overflow
So I'm wondering if the package is published twice during the process. You need to check your build definition to see if the...
Read more >Creating symbol packages (.snupkg) - NuGet - Microsoft Learn
Symbol packages published to NuGet.org will fail validation if these constraints aren't met. Native projects, such as C++ projects, produce ...
Read more >Azure DevOps Server–Error publishing nuget packages
The nuget command failed with exit code(1) and error(Response status code does not indicate success: 409 (Conflict - The feed already contains ' ......
Read more >.NET SDK Support - Jenkins
NET: Publish NuGet package (nuget push); dotnetTest : . ... If this is checked, errors encountered will cause the build status to be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Your workaround is the correct way to achieve what you want.
At some point, NuGet will probably change how symbols packages work. Per their design that a package is uniquely identified by id + version, it’s pretty broken that the client emits two packages with the same id + version but different contents.
what am I doing wrong? I’m using a
dot net push
task step in my Azure CI pipe and am getting this 409 error. I see this git issue is closed as if it’s all good, but I don’t think so.