A few tips for NuGet

Source: Internet
Author: User

Because it is reproduced in this article to mark the source, there have been articles are not marked please understand, because some have been unable to find the source, or other reasons.

If you are offended please contact me, or delete, or indicate the source.

Because the good article, previously only wanted to collect, but the connection sometimes will be invalid, so now meets the good direct transfer to oneself here.

Original source http://www.cnblogs.com/xwgli/archive/2013/09/04/3301932.html

Because of the limitations of the visual Library Package Manager, there are a number of features that are needed that cannot be done in the interface.

The following tips need to be done using commands in the Package Manager console.

First, after changing the project target framework, update the package

When you change the target framework of a project, whether it is an upgrade or a downgrade, the component referenced in the project is not the most appropriate version of the framework, and NuGet automatically appears with a warning prompt to re-update the component, and the action is to point to an English page where the key parts of the page are directly recorded:

Update command: Update-package–reinstall < package name >

Ii. forcing a package to be unloaded (regardless of dependencies)

This is actually combined with the following to form "demote the specified package to the specified version." Because demotion is the first to unload a package, but because it is possible to be dependent on other packages that cannot be uninstalled, you can use the following command to force the uninstallation of a package without affecting other dependencies.

Forced Uninstall: Uninstall-package < package name >-force

Third, install the specified package version

The default is to install the latest version of the package through the graphical interface, but sometimes because of compatibility issues, you may not want the latest version of the package, you can use the following command to install the specified version of the package.

Install the specified version: Install-package < package name >–version < version number >

The version number can be obtained from the package on the NuGet page:/">http://www.nuget.org/packages/< Package name >/

As you work in the console, be aware of the items you are working on to avoid confusing problems:

That's all for the time being ...

A few tips for NuGet

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.