How to upgrade jquery to 2.0.2 when using NuGet Update suite how to Downgrade

Source: Internet
Author: User

Translated from: http://blog.miniasp.com/post/2013/06/11/Downgrading-jQuery-version-with-NuGet.aspx

In Visual Studio 2012, we use NuGet administrators to manage common development function libraries such as jquery, Json.NET, EntityFramework, ELMAH 、... Wait a minute. As you may know, the latest jquery version is 2.0.2, this version is basically only support IE9 above browser (IE8 below), so most people should not choose to install the latest version of the Jqu?? Ery, but in the process of installing or updating a suite with nuget, it is possible to accidentally upgrade the jquery suite to the latest version, causing many compatibility issues with the site. Today's article is mainly about how to manually downgrade jquery to a 1.x version. Note: This method applies to any NuGet suite, so you can refer to this article to specify a degraded version.

I've got a colleague. Because of the need to install a jquery-related suite in the project, the process of installing jquery to the 2.x version, he did not realize that jquery was upgraded, had been stuck for two hours to find me for help, although gave a reduced version of the proposal, But through the GUI interface of the nuget suite , it's not going to reduce the functionality of the existing suite.

To force the installation of jquery, the installation cannot be lifted because of dependencies and other issues:

If you really want to install a specific NuGet suite down, there are 3 main steps:

    1. Open the Package Manager console
    2. Force removal of a specific NuGet suite
    3. Specifies that specific versions of a specific NuGet suite are installed

The following are explained separately:

1. Open the Package Manager console

Select from main Menu: View/Other windows/Suite Manager console

2. Force removal of specific NuGet packages

To remove a specific kit, you must first find the identification number (ID) of the package, which you can query by following these steps:

In the Suite Manager Console , enter the following instruction, where jQuery is the kit identifier, and -force is the force removal meaning:

JQuery -force

3. Specify a specific version of the specific NuGet suite to install

Enter the following instruction in the Suite Manager console , where jQuery is the kit identifier and -version is the specified suite version:

JQuery -version 1.8.3

Note: If you have more than one project in your Visual Studio scenario, you should be aware that you are installing the correct case, as shown in the following red boxes:

If you want to find out how many versions of the kit are there, you can directly connect to the NuGet Gallery website and query the version of the package that was published, with the following URL format:

http://nuget.org/packages/ Kit Knowledge /

For example:

http://nuget.org/packages/jQuery/

※ Supplementary Instructions *

If the jquery suite in your project is a jquery 1.8.3, and you try to install a suite that will depend on the jquery update version (for example, the bootstrap suite will require jquery 1.9.1 or later), during the installation of the kit, NuGet will automatically upgrade your existing jquery 1.8.3 to the latest version, which will result in the situation mentioned in this article.

How to upgrade jquery to 2.0.2 when using NuGet Update suite how to Downgrade

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.