Skip to content

Instantly share code, notes, and snippets.

@AArnott
Created December 6, 2016 22:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AArnott/71a59642d0beb117034a4f92d1981385 to your computer and use it in GitHub Desktop.
Save AArnott/71a59642d0beb117034a4f92d1981385 to your computer and use it in GitHub Desktop.
Downloads the list of nuget packages that depend on a named package
$PackageId = "Microsoft.VisualStudio.Threading"
$wr = Invoke-WebRequest "http://packages.nuget.org/v1/FeedService.svc/Packages?`$filter=substringof(%27$PackageId%27,%20Dependencies)%20eq%20true&`$select=Id,Version,Dependencies"
if ($wr.StatusCode -ne 200) {
Write-Error $wr.StatusDescription
return
}
$xml = [xml]$wr.content
$xml.feed.entry.properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment