Skip to content

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

@Arash-Sabet

Description

@Arash-Sabet

Apparently the release pipeline publishes the generated nugget package twice due to the error message below. It seems like that the package is being tried to republish again due to the conflict:

2025-09-08T01:51:48.4279292Z ##[section]Starting: Pushing to nuget.org
2025-09-08T01:51:48.4285195Z ==============================================================================
2025-09-08T01:51:48.4285456Z Task : NuGet
2025-09-08T01:51:48.4285700Z Description : Restore, pack, or push NuGet packages, or run a NuGet command. Supports NuGet.org and authenticated feeds like Azure Artifacts and MyGet. Uses NuGet.exe and works with .NET Framework apps. For .NET Core and .NET Standard apps, use the .NET Core task.
2025-09-08T01:51:48.4286241Z Version : 2.259.0
2025-09-08T01:51:48.4286515Z Author : Microsoft Corporation
2025-09-08T01:51:48.4286778Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/package/nuget
2025-09-08T01:51:48.4287077Z ==============================================================================
2025-09-08T01:51:48.7293716Z Caching tool: NuGet 4.9.6 x64
2025-09-08T01:51:48.7414130Z Found tool in cache: NuGet 4.9.6 x64
2025-09-08T01:51:48.7447037Z Resolved from tool cache: 4.9.6
2025-09-08T01:51:48.7447736Z Using version: 4.9.6
2025-09-08T01:51:48.7452290Z Found tool in cache: NuGet 4.9.6 x64
2025-09-08T01:51:48.9996746Z Detected NuGet version 4.9.6.8 / 4.9.6+a32bce39889f724fbd11cfd12e946f802168b583
2025-09-08T01:51:49.0028140Z [command]/usr/bin/mono /opt/hostedtoolcache/NuGet/4.9.6/x64/nuget.exe sources Add -NonInteractive -Name httpsapinugetorgv3indexjson -Source https://api.nuget.org/v3/index.json -ConfigFile /home/vsts/work/1/Nuget/tempNuGet_10265.config
2025-09-08T01:51:50.1785922Z Package Source with Name: httpsapinugetorgv3indexjson added successfully.
2025-09-08T01:51:50.1806507Z Using authentication information for the following URI: https://api.nuget.org/v3/index.json
2025-09-08T01:51:50.1822721Z [command]/usr/bin/mono /opt/hostedtoolcache/NuGet/4.9.6/x64/nuget.exe setapikey *** -NonInteractive -Source httpsapinugetorgv3indexjson -ConfigFile /home/vsts/work/1/Nuget/tempNuGet_10265.config
2025-09-08T01:51:51.7911498Z The API Key '***' was saved for 'https://api.nuget.org/v3/index.json'.
2025-09-08T01:51:51.7933026Z [command]/usr/bin/mono /opt/hostedtoolcache/NuGet/4.9.6/x64/nuget.exe push /home/vsts/work/1/a/packages/Xunit.Microsoft.DependencyInjection.9.2.0.nupkg -NonInteractive -Source https://api.nuget.org/v3/index.json -ApiKey *** -ConfigFile /home/vsts/work/1/Nuget/tempNuGet_10265.config -Verbosity Detailed
2025-09-08T01:51:52.2029911Z NuGet Version: 4.9.6.8
2025-09-08T01:51:52.7123956Z Pushing Xunit.Microsoft.DependencyInjection.9.2.0.nupkg to 'https://www.nuget.org/api/v2/package'...
2025-09-08T01:51:52.7197009Z PUT https://www.nuget.org/api/v2/package/
2025-09-08T01:51:53.0808815Z Created https://www.nuget.org/api/v2/package/ 361ms
2025-09-08T01:51:53.0843047Z Your package was pushed.
2025-09-08T01:51:53.0853923Z Pushing Xunit.Microsoft.DependencyInjection.9.2.0.snupkg to 'https://www.nuget.org/api/v2/symbolpackage'...
2025-09-08T01:51:53.0857624Z PUT https://www.nuget.org/api/v2/symbolpackage/
2025-09-08T01:51:53.2127223Z Created https://www.nuget.org/api/v2/symbolpackage/ 126ms
2025-09-08T01:51:53.2129559Z Your package was pushed.
2025-09-08T01:51:53.2386283Z
2025-09-08T01:51:53.2407527Z [command]/usr/bin/mono /opt/hostedtoolcache/NuGet/4.9.6/x64/nuget.exe push /home/vsts/work/1/a/packages/Xunit.Microsoft.DependencyInjection.9.2.0.snupkg -NonInteractive -Source https://api.nuget.org/v3/index.json -ApiKey *** -ConfigFile /home/vsts/work/1/Nuget/tempNuGet_10265.config -Verbosity Detailed
2025-09-08T01:51:53.6443211Z NuGet Version: 4.9.6.8
2025-09-08T01:51:53.7597242Z Pushing Xunit.Microsoft.DependencyInjection.9.2.0.snupkg to 'https://www.nuget.org/api/v2/symbolpackage'...
2025-09-08T01:51:53.7947229Z PUT https://www.nuget.org/api/v2/symbolpackage/
2025-09-08T01:51:54.0490663Z Conflict https://www.nuget.org/api/v2/symbolpackage/ 254ms
2025-09-08T01:51:54.0574327Z Response status code does not indicate success: 409 (It looks like there is another copy of this symbols package pending validation(s). Please wait for the validation(s) to finish before trying to replace the symbols package.).
2025-09-08T01:51:54.0594330Z System.Net.Http.HttpRequestException: Response status code does not indicate success: 409 (It looks like there is another copy of this symbols package pending validation(s). Please wait for the validation(s) to finish before trying to replace the symbols package.).
2025-09-08T01:51:54.0596396Z at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode () [0x00040] in :0
2025-09-08T01:51:54.0597305Z at NuGet.Protocol.Core.Types.PackageUpdateResource+<>c.b__23_0 (System.Net.Http.HttpResponseMessage response) [0x00000] in :0
2025-09-08T01:51:54.0598235Z at NuGet.Protocol.HttpSource.ProcessResponseAsync[T] (NuGet.Protocol.HttpSourceRequest request, System.Func2[T,TResult] processAsync, NuGet.Protocol.Core.Types.SourceCacheContext cacheContext, NuGet.Common.ILogger log, System.Threading.CancellationToken token) [0x000f5] in <dc1b484fc03b4c9e94db6d2032a7a13d>:0 2025-09-08T01:51:54.0599499Z at NuGet.Protocol.Core.Types.PackageUpdateResource.PushPackageToServer (System.String source, System.String apiKey, System.String pathToPackage, System.Int64 packageSize, System.Boolean noServiceEndpoint, System.TimeSpan requestTimeout, NuGet.Common.ILogger logger, System.Threading.CancellationToken token) [0x00408] in <dc1b484fc03b4c9e94db6d2032a7a13d>:0 2025-09-08T01:51:54.0600550Z at NuGet.Protocol.Core.Types.PackageUpdateResource.PushPackageCore (System.String source, System.String apiKey, System.String packageToPush, System.Boolean noServiceEndpoint, System.TimeSpan requestTimeout, NuGet.Common.ILogger log, System.Threading.CancellationToken token) [0x00176] in <dc1b484fc03b4c9e94db6d2032a7a13d>:0 2025-09-08T01:51:54.0601408Z at NuGet.Protocol.Core.Types.PackageUpdateResource.PushPackage (System.String packagePath, System.String source, System.String apiKey, System.Boolean noServiceEndpoint, System.TimeSpan requestTimeout, NuGet.Common.ILogger log, System.Threading.CancellationToken token, System.Boolean isSnupkgPush) [0x00124] in <dc1b484fc03b4c9e94db6d2032a7a13d>:0 2025-09-08T01:51:54.0605717Z at NuGet.Protocol.Core.Types.PackageUpdateResource.PushSymbols (System.String packagePath, System.String source, System.String apiKey, System.Boolean noServiceEndpoint, NuGet.Protocol.Core.Types.SymbolPackageUpdateResourceV3 symbolPackageUpdateResource, System.TimeSpan requestTimeout, NuGet.Common.ILogger log, System.Threading.CancellationToken token) [0x00113] in <dc1b484fc03b4c9e94db6d2032a7a13d>:0 2025-09-08T01:51:54.0612992Z at NuGet.Protocol.Core.Types.PackageUpdateResource.Push (System.String packagePath, System.String symbolSource, System.Int32 timeoutInSecond, System.Boolean disableBuffering, System.Func2[T,TResult] getApiKey, System.Func`2[T,TResult] getSymbolApiKey, System.Boolean noServiceEndpoint, NuGet.Protocol.Core.Types.SymbolPackageUpdateResourceV3 symbolPackageUpdateResource, NuGet.Common.ILogger log) [0x001b9] in :0
2025-09-08T01:51:54.0614009Z at NuGet.Commands.PushRunner.Run (NuGet.Configuration.ISettings settings, NuGet.Configuration.IPackageSourceProvider sourceProvider, System.String packagePath, System.String source, System.String apiKey, System.String symbolSource, System.String symbolApiKey, System.Int32 timeoutSeconds, System.Boolean disableBuffering, System.Boolean noSymbols, System.Boolean noServiceEndpoint, NuGet.Common.ILogger logger) [0x002f3] in :0
2025-09-08T01:51:54.0614767Z at NuGet.CommandLine.PushCommand.ExecuteCommandAsync () [0x0016d] in :0
2025-09-08T01:51:54.0854958Z
2025-09-08T01:51:54.1087054Z ##[error]The nuget command failed with exit code(1) and error(Response status code does not indicate success: 409 (It looks like there is another copy of this symbols package pending validation(s). Please wait for the validation(s) to finish before trying to replace the symbols package.).)
2025-09-08T01:51:54.1094612Z ##[error]Packages failed to publish
2025-09-08T01:51:54.1097943Z ##[section]Finishing: Pushing to nuget.org

Metadata

Metadata

Labels

bugSomething isn't workingci/cd

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions