Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get a list of versions of jQuery using the Nuget console?

Tags:

nuget

I'm trying to figure out a workaround for an issue I have with jQuery 2.0 being the version Nuget wants to update to via the GUI (Can I keep Nuget on the jQuery 1.9.x/1.x path (instead of upgrading to 2.x)?).

Looking at this answer to another question it appears that I should be able to use the Nuget console to get all versions of jQuery:

Get-Package -ListAvailable -Filter 'jQuery' -AllVersions

Then I should be able to pick the version I want and update it:

Install-Package jQuery -Version 1.9.1

or

Update-Package jQuery -Version 1.9.1

Unfortunately, while updating works perfectly, trying to get a list of jQuery versions ends up grabbing numerous projects that merely refer to or contain jQuery in their title.

I suppose I could use Open-PackagePage, but that seems klunky.

However, I don't see any parameters that suggest I can filter by Id in the official docs.

Is there a way to restrict the Nuget console to search only by project Id? Or is there some other way I can get a listing of versions of jQuery using the Nuget console? I've tried quotes around my jQuery filter (-filter 'jQuery') but that didn't resolve the issue either.

like image 909
James Skemp Avatar asked Apr 20 '13 23:04

James Skemp


People also ask

How do I use NuGet console?

To open the console in Visual Studio, go to the main menu and select Tools > NuGet Package Manager > Package Manager Console command.


1 Answers

Type Install-Package JQuery -Version then Space, then Tab.

This displays a list of all available versions for that package.

The problem with Get-Package and its -Filter option is that it does a search of both ID and Description fields. I agree that it would be very useful if there was an -ID option or similar.

like image 158
Dave R. Avatar answered Oct 11 '22 11:10

Dave R.