Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force update TeamCity NuGet feed

When we push a new version of a NuGet package to our NuGet feed the package will appear in the file system on the NuGet server. The NuGet feed API and in visual studio, however only update roughly every hour so we may have to wait up to an hour for new packages to show. Is there a way to force update the NuGet feed to accurately depict what is in the file system?

like image 272
Adamon Avatar asked Mar 12 '23 10:03

Adamon


1 Answers

I've encountered very similar issue, after publishing new package version to private TeamCity NuGet feed it hasn't appeared in visual studio immediately. It took time to update.

However, new package version itself was available via request:

http://<teamcityserver>/guestAuth/app/nuget/v1/FeedService.svc/Packages(Id='<packageId>',Version='<newPackageVersion>')

For example:

http://test:8111/guestAuth/app/nuget/v1/FeedService.svc/Packages(Id='TestPackage',Version='1.0.1')

I resolved it by cleaning local NuGet cache via

Tools → Options →  NuGet Package Manager → General → Clear all NuGet cache(s)

or

dotnet nuget locals all --clear

See related answer:

https://stackoverflow.com/a/42665980/2793919

like image 124
Sergey Nikitin Avatar answered Mar 31 '23 15:03

Sergey Nikitin