简体   繁体   中英

Downgrade jQuery version from 2.1.1 to 1.9.1 via Package Console Manager from Visual Studio

I have jQuery version 2.1.1 and wanted to downgrade to 1.9.1, i have tried Install and Update commands, but both are failing claiming that a more recent version of jquery is installed for my project:

PM> Update-Package jQuery -Version 1.9.1
PM> Install-Package jQuery -Version 1.9.1 

I thought that package manager would be taking care of this process but it seems not. I cannot uninstall it because of dependencies of others installed packages.

What are my options?

Delete the jQuery entry in your packages.config file, then just run the install for the specific version.

eg

PM> Install-Package jQuery -Version 1.9.1 

You can then simply delete the old JQuery version (only one script file).

PS: I recommend you go with jQuery 1.11.0 if you can :)

I also encountered a similar case where I wanted to downgrade version of jquery which was in turn acting as dependency for various other components.

The easiest way I found was that go to Nuget Package Manager > Manage Nuget Packages for Solution

下坡 Select relevant package (jquery for me) under Installed tab on left hand side of screen. On right hand side, You will be seeing a dropdown next to Version label. Select the version to which you want to downgrade (or upgrade) & Click on Install.

PS: This is available for VS2015+

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM