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?

4 comments
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 https://go.microsoft.com/fwink/?LinkID=230477 -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

David


0
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.

0
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.

http://youtrack.jetbrains.com/issue/TW-20855
http://youtrack.jetbrains.com/issue/TW-19959

It might be possible to add manually http://youtrack.jetbrains.com/issue/TW-19365 and remove manually http://youtrack.jetbrains.com/issue/TW-287 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.

0
Comment actions Permalink

Thats a pity, defining an already existing package as buildArtifact as stated in http://youtrack.jetbrains.com/issue/TW-20855 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)
http://docs.nuget.org/docs/creating-packages/hosting-your-own-nuget-feeds

How to create a private NuGet Gallery
http://www.i-m-code.com/blog/blog/2012/03/17/setup-own-nuget-gallery-in-minutes/


Then you can publish to these repos using TeamCity

0

Please sign in to leave a comment.