0

I have a TeamCity project that builds a C# .NET solution and builds a NuGet package for deployment. One of the steps then publishes the NuGet package to an Octopus Deploy library repository. For some reason my TeamCity project is pushing the NuGet package to the Octopus library repository 18 times. I have expanded the first push to show the details.

[13:52:56]Step 3/5: Publish Nuget Package (NuGet Publish) (3m:24s)
[13:52:56][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.20520.nupkg (13s)
[13:52:56][push] NuGet command: C:\TeamCity\buildAgent\plugins\nuget-agent\bin\JetBrains.TeamCity.NuGetRunner.exe C:\TeamCity\buildAgent\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe push C:\DEVONLINE\IRM\Main\MyWebProject\MyWebProject\bin\MyWebProject.2.19.5627.20520.nupkg %%teamcity_nuget_api_key_1433181176848%% -Source http://localhost:8024/nuget/packages
[13:52:56][push] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script3530589901220837023.cmd
[13:52:56][push] in directory: C:\DEVONLINE\Main\MyWebProject\bin
[13:52:56][push] JetBrains TeamCity NuGet Runner 8.0.32060.9
[13:52:56][push] Registered additional extensions from paths: C:\TeamCity\buildAgent\plugins\nuget-agent\bin\plugins-2.8
[13:52:56][push] Starting NuGet.exe 2.8.50926.602 from C:\TeamCity\buildAgent\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe
[13:52:57][push] Pushing MyWebProject 2.19.5627.20520 to 'http://localhost:8024/nuget/packages'...
[13:53:10][push] Your package was pushed.
[13:53:10][push] Process exited with code 0
[13:53:10][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.21133.nupkg (12s)
[13:53:23][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.21281.nupkg (5s)
[13:53:28][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.21680.nupkg (14s)
[13:53:42][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.21777.nupkg (12s)
[13:53:55][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.23661.nupkg (6s)
[13:54:02][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.23808.nupkg (12s)
[13:54:14][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.24431.nupkg (13s)
[13:54:28][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.25366.nupkg (6s)
[13:54:34][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.25732.nupkg (15s)
[13:54:49][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.26132.nupkg (13s)
[13:55:02][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.26469.nupkg (6s)
[13:55:09][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5627.26890.nupkg (13s)
[13:55:23][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5630.18299.nupkg (7s)
[13:55:30][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5630.18837.nupkg (8s)
[13:55:39][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5630.20862.nupkg (17s)
[13:55:56][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5630.22872.nupkg (7s)
[13:56:03][Step 3/5] push: Publish package MyWebProject\bin\MyWebProject.2.19.5630.23126.nupkg (17s)

My Sln contains a total of 14 projects. What could be causing the NuGet package to be pushed to the Octopus Library so many times?

ihatemash
  • 1,474
  • 3
  • 21
  • 42

1 Answers1

3

The log file you posted has the information you need, here is an updated version with some of the noise taken out... cast your eyes down the package names in the column marked by stars.

---------------------*****------------
[13:53:10] 2.19.5627.21133.nupkg (12s)
[13:53:23] 2.19.5627.21281.nupkg (5s)
[13:53:28] 2.19.5627.21680.nupkg (14s)
[13:53:42] 2.19.5627.21777.nupkg (12s)
[13:53:55] 2.19.5627.23661.nupkg (6s)
[13:54:02] 2.19.5627.23808.nupkg (12s)
[13:54:14] 2.19.5627.24431.nupkg (13s)
[13:54:28] 2.19.5627.25366.nupkg (6s)
[13:54:34] 2.19.5627.25732.nupkg (15s)
[13:54:49] 2.19.5627.26132.nupkg (13s)
[13:55:02] 2.19.5627.26469.nupkg (6s)
[13:55:09] 2.19.5627.26890.nupkg (13s)
[13:55:23] 2.19.5630.18299.nupkg (7s)
[13:55:30] 2.19.5630.18837.nupkg (8s)
[13:55:39] 2.19.5630.20862.nupkg (17s)
[13:55:56] 2.19.5630.22872.nupkg (7s)
[13:56:03] 2.19.5630.23126.nupkg (17s)

You may be able to solve this issue using Team City's clean checkout option to remove old versions each time the source is fetched.

Fenton
  • 241,084
  • 71
  • 387
  • 401