Issues with multiple NuGet feed sources setup
Hi all
We’ve just recently upgraded from TC 9.1.1 to TC 2017.2.3 (Enterprise). Since the upgrade, we do have issues with the feed management in powershell scripts we're running on agents as meta-runners and/or build steps, where we (up to now) added TeamCity’s own feed and authenticated against it using nuget CLI (NuGet sources …): Apparently the powershell context in the new TC version allows the NuGet CLI to gather NuGet configuration files and thus already knows configured feeds. This, again results in CLI exceptions on nuget when adding sources that already exist or updating sources where multiple exist etc.
The main issue here is, that we’re running multiple agents with different configurations and age and not all have the same amount of feeds if we do a nuget sources list during build. But we fail to see how nuget even “gets” the feed list. We’ve searched for nuget.conf files on the agents, but that did not answer all feed sources so far.
So, first of all we do have a request for information on how exactly the NuGet CLI, running in the TC powershell context conducts the feed configurations. We’ve tested the behavior with Nuget 2.8.2, 3.5.0 and 4.6.0 and can reproduce the behaviour and the listed sources stay consistent per agent.
Thanks & BR,
Reto
Please sign in to leave a comment.
Alright, so I guess I can answer my own question by now: the TC service user runs under the "service" user profile. This user happens to have two profiles, one for 32bit and one for 64bit. NuGet feed sources configured in builds may end up (I don't know exactly in what situations) in the nuget.config under C:\Windows\system32\config\systemprofile\AppData\Roaming.