Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nuget command line - how to get version of latest version of package?

Tags:

nuget

in a powershell script, i want to be able to know the version of a package on which i depend. can i get nuget.exe to tell me this information?

i've tried to do something like:

nuget list nunit.runners

this works fine for some packages, but for some (like the nunit.runners in the example), it returns a whole list of packages instead of just the one i want.

it would suffice if someone could point out a way to make nuget list return only a single item on an exact match on the search condition.

my question is really, though, what is the most straightforward way to ask a nuget feed for the version number of the latest version of a specific package?

like image 339
Dave Rael Avatar asked Dec 26 '22 08:12

Dave Rael


1 Answers

It is a requested feature in codeplex. I'm working outside of Visual Studio, in PowerShell, and was able to work around using:

nuget list id:EntityFramework | ? { $_ -match "^EntityFramework\s+" }
like image 117
mlhDev Avatar answered Apr 14 '23 07:04

mlhDev