tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

NuGet on TeamCity gotcha

10 May 2015 1 mins Continuous Integration, TeamCity

I was moving our build server to new hardware and as I was checking whether everything works as expected – some builds have pretty complicated environment setup – I found issue or let’s say behavior that might not be obvious related to NuGet handling on TeamCity.

The NuGet, by definition, contains all packages ever published. Because you don’t know who might be using it (and might need to re-download it). But NuGet packages published by TeamCity from builds are artifacts as any other. And when the history of build configuration is cleaned up depending on your settings also the packages are effectively removed from the feed.

Then when you have a project that is using that “old” version you might have trouble building (I suppose you’re not putting packages into VCS, of course) it. Luckily with TeamCity being, likely, your own build server you might be able to use some newer version (never a bad idea to use up-to-date binaries) or resolve some incompatibilities.

Thinking about it it makes perfect sense. It’s the result of the behavior. But it’s good to think about it in advance. Maybe having the clean up policy for the packages with bit more longer interval than other projects.

Profile Picture Jiří Činčura is .NET, C# and Firebird expert. He focuses on data and business layers, language constructs, parallelism, databases and performance. For almost two decades he contributes to open-source, i.e. FirebirdClient. He works as a senior software engineer for Microsoft. Frequent speaker and blogger at