Limit the version number of the NuGet update package

Source: Internet
Author: User

When searching for other questions today, I suddenly found a little trick to use NuGet.

Because of browser compatibility issues, many Web site projects reference the JQuery component version needs to remain below 2.0, because more than 2.0 requires modern browser support, but NuGet does not care about your problem, it will only push the latest version to you, so before also talked about how to install a specific version of the NuGet package.

But now there is a more practical way to specify the desired version number range directly in the NuGet configuration file (packages.config).

For example, limit jQuery to a version number greater than or equal to 1.9, less than 2:

<id= "JQuery"  version= "1.11.1"  allowedversions= "[1.9,2)"  targetframework= "net45"/>

In the original configuration based on the addition of the Allowedversions attribute, which is a version number of the range of expressions.

Limit the version number of the NuGet update package

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.