Skip to content
 Get your free $10 hosting credit - Click Here and sign up!

How to limit update-package to jquery 1.x in nuget Visual Studio

2013 July 15

jQuery 2.x does not work with IE 6, 7, 8 so to keep the nuget “update-package” command from updating to 2.x, you need to edit the existing jQuery line in your packages.config file.  This file is in the root of your application.

 <package id="jQuery" version="1.10.1" targetFramework="net45" allowedVersions="[1.10.1,2)" />

You can quickly find the pacakges.config by using the search functionality in the Solution Explorer (pic)



I’m using Visual Studio 2012, with .NET 4.5.  You might have to change the targetframework if you are using an older framework.

  • Pingback: How to update jQuery in a Visual Studio Project (MVC 4) |

  • Alex

    That didn’t work
    Nuget just ignores the allowed version and install the latest one 🙁

  • mark

    Sorry to hear that it didn’t work for you, Alex. Can you verify that the end of your allowedVersions ends with a ) and not a ]. The ) tells the system to not include version 2. So it looks like: allowedVersions=”[1.10.1,2)”

  • mark

    Two other things to try:

    – You could also try a lower minimum version: allowedVersions=”[1.9.3,2)”

    – Make sure that there aren’t 2 lines in your packages.config for jQuery