Preventing Nuget from Updating jQuery to Version 2
Wednesday, July 3, 2013
As someone who loves new stuff, it pains me to write this post about how to prevent updating jQuery to version 2.0.
When jQuery 2.0 came out, the big news was that it no longer supported IE 8 and below. They will still release and support version 1.X of the framework, which will continue to work with IE 8, however. For those of us who still have to support XP on some projects, this is the version we need to use.
The problem for us .NET developers is that all current ASP.NET project templates come with jQuery installed as a Nuget package. This is a good thing, as it makes things really simple to update. The problem appears if we just blindly hit the Update button in the Nuget Package Manager (or the recently added Update All button)... it'll actually pull down version 2…
To fix this, we need to modify our package.config files in our projects to specify a minimum and maximum version numbers for jQuery. (The parenthesis is correct, it means "up to but not including 2")
Also confirm that we're running Nuget 2.6 or above.
Now when we try to update the package, we no longer see the 2.X packages…
As someone who loves new stuff, it pains me to write this post about how to prevent updating jQuery to version 2.0.
When jQuery 2.0 came out, the big news was that it no longer supported IE 8 and below. They will still release and support version 1.X of the framework, which will continue to work with IE 8, however. For those of us who still have to support XP on some projects, this is the version we need to use.
The problem for us .NET developers is that all current ASP.NET project templates come with jQuery installed as a Nuget package. This is a good thing, as it makes things really simple to update. The problem appears if we just blindly hit the Update button in the Nuget Package Manager (or the recently added Update All button)... it'll actually pull down version 2…
To fix this, we need to modify our package.config files in our projects to specify a minimum and maximum version numbers for jQuery. (The parenthesis is correct, it means "up to but not including 2")
Also confirm that we're running Nuget 2.6 or above.
Now when we try to update the package, we no longer see the 2.X packages…