Specifying a specific maximum version of a nuget package (jQuery 1.x for IE8)

Sep 30, 2013 • val antonini

Sometimes you still need to support Internet Explorer 8 which means using a 1.x version of jQuery. For Microsoft MVC projects its as easy as adding the below line to your packages.config for your project before installing other packages such as Twitter Bootstrap. If you have already installed other packages that installed jQuery as a dependency you may have to uninstall then re-install them.

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

See here for more information on what browsers are supported.