20

I have updated the jquery version 2.0 but i found that this is not compatible with ie7 and 8 now i want to revert to old version 1.9.0. When i try to install this with Nuget console it gives me error that already new version is installed.

install-package jquery -version 1.9.0
Successfully installed 'jQuery 1.9.0'.
Install failed. Rolling back...
Install-Package : Already referencing a newer version of 'jQuery'.
At line:1 char:16
+ install-package <<<<  jquery -version 1.9
+ CategoryInfo          : NotSpecified: (:) [Install-Package],     InvalidOperationException
 + FullyQualifiedErrorId :NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
Altaf Sami
  • 846
  • 5
  • 10
  • 21

1 Answers1

50

Try uninstalling the 2.0 version first:

Uninstall-Package [yourpackage] -Force

Then reinstalling the older package:

install-package jquery -version 1.9.0

aiapatag
  • 3,355
  • 20
  • 24
  • 6
    Well this answer - though duplicate - still helped me. Because the duplicate answer did NOT specify the '-Force' argument given here. As installing jQuery 1.9(.1) gave an error/warning I had jQuery 2.0(.3) already installed. And uninstalling 2.0(.3) gave a warning/error that other packages (like jQuery UI, jQuery Validation) were dependent on it. But deleting it using -Force, and then installing 1.9 WAS possible. – Bart Aug 12 '13 at 08:41
  • I confused about [yourpackage] but I found that is just jquery because one version of jquery was installed at a time. Thanks. – QMaster Jul 10 '16 at 13:55