In Visual Studio 2012, we use NUGET administrators to manage common open library repositories such as jquery, Json.NET, EntityFramework, ELMAH 、... Wait a minute. As you may also know, the latest jquery version is 2.0.2 version, this latest version basically only supports IE9 above browser (IE8 below), so most people should not choose to install the latest version of jquery, but in the use of NuGet installation or update kit, but there is a Can accidentally upgrade the JQuery suite to the latest version, which leads to many compatibility problems. Today's article is mainly about how to move JQuery down to the 1.x version. Registration: This method is suitable for any NuGet suite, so you can refer to this article if you want to specify a reduced version.
I have colleagues because of the need to install a jQuery-related suite, in the process of the installation of jquery to the upgrade to the 2.x version, he did not consciously realize that jquery was upgraded, was stuck two hours to find me for help, although to the proposed reduction version of the advice, But through the GUI interface that manages the NuGet suite , it's not going to have the features of the suite's reduced version.
If you want to enforce the installation of JQuery, you will also be unable to disarm because of dependencies and other problems:
If you really want to install a specific NuGet package down, there are 3 main steps:
- Open the Suite Manager console
- Compelling removal of specific NuGet packages
- Specify a specific version of the installation specific NuGet Suite
The following points are stated:
1. Open the Suite Manager console
Select from the main menu: Video / Other Windows / Suite Manager Console
2. Compelling removal of specific NuGet kits
To remove a particular suite, you must first identify the knowledge (ID) of the suite, and you can check out the following steps:
Enter the following instruction in the Suite Manager console , where jQuery is the kit knowledge, and -force is a compelling removal meaning:
JQuery -force
3. Specify a specific version of the installation specific NuGet kit
Enter the following instruction in the Suite Manager console , where jQuery is the kit knowledge, 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 available, you can connect directly to the NuGet Gallery website to find out which version of the package has been published, in the following format:
http://nuget.org/packages/ Kit Knowledge /
For example:
http://nuget.org/packages/jQuery/
※ Supplemental charge stating ※
If the jquery suite in your case is a jquery 1.8.3, and the attempt to install a kit will depend on the updated version of jquery (for example, the Bootstrap suite requires jquery 1.9.1 or later), then in the process of the installation, NuGet will move your existing jQuery 1.8.3 liters to the latest version, it also causes the situation mentioned in this article.
Upgrade JQuery to 2.0.2 when using the NuGet Update Kit how to go down