Prevent Teamcity from saving NuGet Package Artifacts
For some reason TeamCity (8.1) is capturing the Nuget packages my build creates as artifacts, although I don't specify them as such in the build configuration.
More specifically, I don't want it to. We have quite a few build configurations which are merely there to assert that the compilation and testing will go through when merged to the dev branch. But even there, as the Nuget packages created are roughly 50MB per build (at about 20 commits per day), this starts to become an issue quite quickly. Furthermore, we don't keep the built packages on TeamCity anyway, but on some other machine with plenty of space.
I have not found a way to stop TeamCity from capturing these packages, the only workaround was to set the retention policy to only a few builds. This works, but I'd prefer to keep longer build history instead of Nuget packages I have somewhere else anyway.
Please sign in to leave a comment.
Hi Fabian,
TeamCity shouldn't be taking artifacts by default unless you are explicitly asking it to. There're three options for it to happen:
* Manually specify required nupkg files as build artifacts
* Use NuGet Pack build step with "Publish created packages to build artifacts" option selected
* Use NuGet Publish build step and specify teamcity nuget feed url and packages (Since 2017.1)
Under those conditions they'll be kept, but otherwise they shouldn't. If they are being kept, it might be a bug, but in such an old release, it won't be fixed. You would need to upgrade, and if it still reproduces then we would look at it as there might be more conditions required for it to happen (and as far as we can tell it doesn't).