Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In TeamCity, is there a way to list all NuGet packages used by all projects?

Tags:

nuget

teamcity

Does anyone know of a way to aggregate all of the NuGet packages used for all of the most recent builds on a TeamCity server?

For each build in TeamCity there's a tab that shows what NuGet packages were used by that build:

https://blog.jetbrains.com/teamcity/2013/08/nuget-package-restore-with-teamcity/

That's great, but we would like to find dependencies for all projects without manually visiting each of the build pages.

like image 212
Anthony F Avatar asked Aug 05 '16 19:08

Anthony F


People also ask

How do I publish a NuGet package to TeamCity?

When using TeamCity as a NuGet server, there are three ways to publish packages to the feed: as build artifacts of the NuGet Pack build step using the Publish created packages to build artifacts checkbox - in this case you do not need the NuGet Publish build step. via the NuGet Publish build step.

What is a NuGet feed?

Cloudsmith provides public & private feeds for NuGet. NuGet is an open-source package manager designed for the Microsoft development technologies. The NuGet repository support at Cloudsmith is compatible with Chocolatey, so if you're looking to manage packages on Windows, that's our recommended approach.

What does a Nuspec file do?

A . nuspec file is an XML manifest that contains package metadata. This manifest is used both to build the package and to provide information to consumers. The manifest is always included in a package.


1 Answers

This URL returns an XML with the top 100 NuGet packages on the server. Use Internet Explorer to see the list of available packages. Other browsers display the raw XML.

http://TEAMCITY_SERVER_ADDRESS/guestAuth/app/nuget/v1/FeedService.svc/Packages()

To get all versions of a specific package

http://TEAMCITY_SERVER_ADDRESS/guestAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?Id='PACKAGE_NAME'
like image 51
Laszlo Pinter Avatar answered Sep 20 '22 16:09

Laszlo Pinter