none
reinstall package from package manager console RRS feed

  • Question

  • Hi,

    I have reinstalled NuGet the packages from Visual Studio 16.4 by using this command 

    -> update-package -reinstall 

    After used this command, Packages reinstalled with corresponding targetversion but also updated the package version to latest from nuget.org.

    Is this process correct?

    reinstall means only reinstall the package with same version with corresponding framework. Why update the package version to latest?

    Can you please update on this?

    Tuesday, January 21, 2020 11:03 AM

Answers

  • Hi PKarthick,

    Welcome to MSDN forum.

    By default, reinstalling or updating a package always installs the latest version available from the package source. So, yes, this process is correct.

    However, you can specifically constrain the version range by using packages.config management format. Please open packages.config in a text editor, locate the dependency in question, and add the allowedVersions attribute with a version range. For example, to constrain updates to version 1.x, set allowedVersions to [1,2).

    >> Why update the package version to latest?

    ## I’m afraid but actually, it is by default. You could also refer to this official document Constraining upgrade versions and get more detailed explanation.

    BTW, You could suggest a feature to the VS product team directly from VS -> Help -> Send Feedback -> Suggest a Feature…

    Hope all above could help you and feel free to contact us if my suggestion is useful or not.

    Kind Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, January 22, 2020 2:46 AM

All replies

  • Hi PKarthick,

    Welcome to MSDN forum.

    By default, reinstalling or updating a package always installs the latest version available from the package source. So, yes, this process is correct.

    However, you can specifically constrain the version range by using packages.config management format. Please open packages.config in a text editor, locate the dependency in question, and add the allowedVersions attribute with a version range. For example, to constrain updates to version 1.x, set allowedVersions to [1,2).

    >> Why update the package version to latest?

    ## I’m afraid but actually, it is by default. You could also refer to this official document Constraining upgrade versions and get more detailed explanation.

    BTW, You could suggest a feature to the VS product team directly from VS -> Help -> Send Feedback -> Suggest a Feature…

    Hope all above could help you and feel free to contact us if my suggestion is useful or not.

    Kind Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, January 22, 2020 2:46 AM
  • Hi PKarthick,

    Sorry to bother you.

    Do you have any update? Does my suggestion useful for you to solve your issue?

    Any feedback will be expected.

    Kind Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by PKarthick Tuesday, January 28, 2020 11:24 AM
    • Unmarked as answer by PKarthick Tuesday, January 28, 2020 11:24 AM
    Thursday, January 23, 2020 7:25 AM
  • Hi Tianyu,

    Thanks for your response!!!. I got cleared about reinstalling package and its useful to me.

    Regards,

    Karthick


    Tuesday, January 28, 2020 11:44 AM