Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 15, 2025

The Azure Pipeline was attempting to push NuGet packages twice, causing a 409 Conflict error during deployment. The issue occurred because the pipeline was explicitly pushing both .nupkg and .snupkg files, but NuGet automatically handles symbols packages when pushing the main package.

Problem

The pipeline configuration in azure-pipelines.yml included both patterns:

packagesToPush: '$(Build.ArtifactStagingDirectory)/packages/**/*.nupkg;$(Build.ArtifactStagingDirectory)/packages/**/*.snupkg'

This caused the following sequence:

  1. Push Xunit.Microsoft.DependencyInjection.9.2.0.nupkg
  2. NuGet automatically pushes corresponding Xunit.Microsoft.DependencyInjection.9.2.0.snupkg
  3. Pipeline explicitly tries to push Xunit.Microsoft.DependencyInjection.9.2.0.snupkg again ❌
  4. Results in 409 Conflict: "It looks like there is another copy of this symbols package pending validation(s)"

Solution

Updated the pipeline to only push .nupkg files and let NuGet handle the symbols packages automatically:

packagesToPush: '$(Build.ArtifactStagingDirectory)/packages/**/*.nupkg'

This eliminates the duplicate push while maintaining all existing functionality. Both the main package and symbols package are still published correctly to NuGet.org.

Fixes #324.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] azure-pipelines.yml likely tries to resubmit the already-submitted nugget package to NuGet.org Fix duplicate NuGet package submission in Azure Pipeline Sep 15, 2025
Copilot finished work on behalf of Arash-Sabet September 15, 2025 00:30
@Arash-Sabet Arash-Sabet marked this pull request as ready for review September 15, 2025 00:33
@Arash-Sabet Arash-Sabet merged commit c5f03cc into main Sep 15, 2025
1 check passed
@Arash-Sabet Arash-Sabet deleted the copilot/fix-324 branch September 15, 2025 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azure-pipelines.yml likely tries to resubmit the already-submitted nugget package to NuGet.org
2 participants