How do I manage my Nuget packages in TeamCity?

I have a lot of demo and test packages from learning how to push Nuget packages into TeamCity, but I can't figure out how to manage packages once they've been included into the feed.

There doesn't appear to be any way to add/update/delete feeds through the TeamCity user interface, and the only method I've even found a reference to is guestAuth/app/nuget/v1/FeedService.svc/Packages(), but that just lists the packages.

How do I get rid of unused packages, and how can I hopefully manually add packages without using the Nuget Pack or Nuget Publish tasks?

Comment actions Permalink

Same Question here, I was hoping to set up some kind of Script to manually remove / add Packages to our private TeamCity NuGet Feed.
Also, I'm having Trouble pushing packages to the Feed by commandLine, Nolan, what did you use to push Packages to TeamCity? For me, it works by using the TeamCity Package task, but when i try to push a package
by command line with NuGet.exe push, I get the following:

> C:\Program Files\NuGet\NuGet.exe' push .\jQuery.1.7.1.nupkg -Source https://<teamcityserver>/httpAuth/app/nuget/v1/FeedService.svc
Pushing jQuery 1.7.1 to 'https://<teamcityserver>/httpAuth/app/nuget/v1/FeedService.svc ...

Please provide credentials for:https://<teamcityserver>/httpAuth/app/nuget/v1/FeedService.svc

UserName:< username>
Password: *********

Failed to process request. 'Method Not Allowed'. (405)

Also, I tried installing the NuGet copy extension and adding a Public package to my private repository:

'C:\Program Files\NuGet\NuGet.exe' copy jQuery -Source -Destination https://<teamcityserver>/httpAuth/app/nuget/v1/FeedService.svc

Methode nicht gefunden: "System.Collections.Generic.List`1<System.String> NuGet.Commands.Command.get_Arguments()".

Any help would be great


Comment actions Permalink

@Davis, I used the command line task, doing "dir", but configured to pull in some manually created packages as artifacts.  I've been able to use the package task as well.  I haven't tried the command line at all, I'm setting this up for some other developers that are not comfortable with the command line.

Comment actions Permalink

Somewhat answering my own question.  There is no direct support for adding packages outside of the nuget pack and nuget publish tasks in TeamCity, or for removing a package.

It might be possible to add manually and remove manually but pursuing this is not a high priority for me right now.  If I ever come back and try these I'll update this thread with the results.

Comment actions Permalink

Thats a pity, defining an already existing package as buildArtifact as stated in is not really an option as we want to create a simple internal independent repository containing internal and external libraries.
For anyone wanting to try something similar, here are some links of interest:

Simple NuGet Feed with drag&drop / push support (official NuGet server package)

How to create a private NuGet Gallery

Then you can publish to these repos using TeamCity


Please sign in to leave a comment.